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

[iOS] Add eTLD+1 extension on URL and update usage of baseDomain where appropriate #44214

Open
3 of 5 tasks
StephenHeaps opened this issue Feb 25, 2025 · 1 comment
Open
3 of 5 tasks
Labels
bug OS/iOS Fixes related to iOS browser functionality privacy security

Comments

@StephenHeaps
Copy link

Description

Currently we are using baseDomain: String? extension on URL when we intend to use the eTLD+1. This can cause issues when the computed property returns nil. This can happen with urls listed in effective_tld_names.dat, for example httpbin.org.

Steps to reproduce

User Agent:

  1. Visit httpbin.org
  2. Using Safari web inspector, check the value of navigator.userAgent. It should contain Mobile by default
  3. Tap ... and tap Request Desktop Site (may be behind Show All).
  4. Using Safari web inspector, check the value of navigator.userAgent.
  5. Bug: still using Mobile user agent despite requesting desktop site.

Shred:

  1. Visit httpbin.org
  2. Tap ... and tap Shred Site Data (may be behind Show All).
  3. In the confirmation alert, tap Shred Data
  4. Bug: Site is not shred, tab remains open.

Actual result

User Agent:

  • Still uses Mobile user agent despite requesting desktop site.

Shred:

  • Site is not shred, tab remains open

Expected result

User Agent:

  • User agent correctly updates to desktop user agent.

Shred:

  • Site is shred, tabs closed

Reproduces how often

Easily reproduced

Brave version

Device/iOS version

Affected browser versions

  • latest AppStore
  • latest TestFlight
  • previous TestFlight

Reproducibility

  • with Brave Shields disabled
  • in the latest version of mobile Safari

Miscellaneous information

There's likely more cases where we expect baseDomain to be non-nil and it causes unintended issues like above with User Agent and Shred.

@StephenHeaps StephenHeaps added OS/iOS Fixes related to iOS browser functionality bug labels Feb 25, 2025
@ShivanKaul
Copy link
Collaborator

cc @stoletheminerals @diracdeltas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug OS/iOS Fixes related to iOS browser functionality privacy security
Projects
None yet
Development

No branches or pull requests

3 participants