Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BSK with a fix for query params #513

Merged
merged 1 commit into from
Apr 11, 2022
Merged

Conversation

jaceklyp
Copy link
Contributor

@jaceklyp jaceklyp commented Apr 7, 2022

Task/Issue URL: https://app.asana.com/0/0/1202080405650495/f
CC: @ayoy

Description:
Update BSK with a fix for query params

Steps to test this PR:

  1. Run privacy ref tests.
  2. Open problematic URL from Asana task
  3. See if the .pkg file downloads

jaceklyp added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Apr 11, 2022
…ebuild the url after we strip tracking params (#83)

Task/Issue URL: https://app.asana.com/0/0/1202080405650495/f
iOS PR: duckduckgo/iOS#1113
macOS PR: duckduckgo/macos-browser#513

Description:

We can use the percentEncodedQueryItems on URLComponents instead of queryItems. It will ensure that after we strip some parameters we will use exactly the same ones (same format) from before the stripping (obviously without parameters we deliberately removed).

It won't harm the stripping logic because there we match against param names rather than param values, and param names are not affected by encoding issues.

One thing to remember though, this logic can fail if there are any param names which can be affected by percent encoding. If so, we should send them in privacy config in encoded format.

There is also additional safe check - if we do not remove any params, we return the original URL.
@jaceklyp jaceklyp force-pushed the jacek/query-params-fix branch from 61bef5e to 49afed2 Compare April 11, 2022 13:13
@jaceklyp jaceklyp force-pushed the jacek/query-params-fix branch from 49afed2 to c0c6b5f Compare April 11, 2022 13:21
@jaceklyp jaceklyp merged commit ec92328 into develop Apr 11, 2022
@jaceklyp jaceklyp deleted the jacek/query-params-fix branch April 11, 2022 13:54
samsymons added a commit that referenced this pull request Apr 14, 2022
# By Dominik Kapusta (4) and others
# Via GitHub
* develop:
  ‘Rename user-facing “Preferences” strings to “Settings”. (#519)
  Fix URLs with port and replace spaces in query with %20 (#506)
  Printing custom frame (#530)
  Fix warnings in unit tests target (#490)
  Version 0.22.3
  FTP scheme handled as internal (#524)
  Old compilation flag removed (#531)
  Don't use ZStack as it messes up the layout on Catalina (#532)
  Disable context menu for Privacy Dashboard (#512)
  Add unit tests Github Actions workflow (#525)
  Add a shell script and GitHub Action to create notarized builds (#517)
  Add missing period in 'Privacy, simplified.' tagline (#527)
  move some state into the model so that SwiftUI doesn't remember it if that object comes back (#521)
  Prevent the Autofill Cancel button from resetting item selection (#520)
  Fix animation hitching. (#518)
  Add description fields to breakage reporting flows (#511)
  Update BSK with a fix for query params (#513)
  set the default height of the navigation bar so that it can be used when configuring a popup window (#522)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants