Open Bug 2008359 Opened 11 months ago Updated 1 month ago

amazon.fr registers itself as amazon.com in shortcuts

Categories

(Firefox :: Top Sites, defect, P3)

Firefox 146
defect

Tracking

()

ASSIGNED

People

(Reporter: bastien, Assigned: chimaifeanyi29)

Details

Attachments

(1 external file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0

Steps to reproduce:

  • Start clean install of Firefox, remove sponsored links and default shortcuts to make space
  • Visit amazon.fr and click through a few links
  • Restart firefox to update shortcuts faster
  • Open new tab, and check shortcut link
  • Click on address bar without typing anything and check link
  • Start typing amazon and check link

Additional proof:

  • Open history, check for amazon.com (there should be none)
  • Clear all amazon.fr links from history, restart and check shortcuts again (it should have disappeared)

Noticed on my Windows computer and verified in a Linux VM

Actual results:

In new tab, link is amazon.com instead of amazon.fr
In empty address bar, link is amazon.com instead of amazon.fr
When typing, link is correctly pointing to amazon.fr

In every case the text is in french, corresponding to amazon.fr

Expected results:

All the links and shortcuts should point to the visited website, amazon.fr
A website should not be able to register itself as any other adress than the one visited, as it could be a security issue

The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Address Bar
Component: Address Bar → Top Sites

Hello, thank you for the bug report!
I managed to reproduce this issue on:

  • Firefox Nightly 149.0a1;
  • Firefox 148.0b5;

Tested and reproduced on:

  • Windows 10;
  • Ubuntu 22;
  • macOS 15;

Setting as NEW so the developing team can have a look.

Status: UNCONFIRMED → NEW
Ever confirmed: true

The severity field is not set for this bug.
:jteow, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jteow)

I was able to reproduce this, though I think the nuance I'm seeing is that it's a search shortcut for Amazon.com

I think it's because in TopSites, there is string match against the short URL which removes the TLD so it'll match amazon to the amazon in SearchShortcuts.

We've been thinking about deprecating search shortcuts, but until we do, we could include the TLD in the matching.

Severity: -- → S3
Flags: needinfo?(jteow)
Priority: -- → P3
Assignee: nobody → chimaifeanyi29
Status: NEW → ASSIGNED

After doing more investigation following :thecount's experience reproducing the STR without a search shortcut, I realize my initial investigation only scratched the surface.

The use of shortURL can cause some issues with different TLDs:

  1. Dedupe: It's used as de-dupe key since hostnames are encoded using that helper, e.g. _readDefaults, but can result in sites being de-duplicated even when their TLD's don't match, e.g. recent visits to box.com and box.co.uk.
  2. Search-shortcut URL rewrite: In getTopFrecentSites if a shortened URL matches a search shortcut provider, it will have its URL overwritten to the search provider. Hence visiting amazon.ca in Canada (where amazon.com is not an app-provided search engine) can generate a tile that goes to amazon.com but isn't a search shortcut.
  3. Search-shortcut labeling: In topSiteToSearchTopSite, it checks if the host matches a search provider, so if a user is in the US (where amazon.com is currently an app-provided engine) and visits amazon.ca, it will match the search shortcut.

I'd like to chat with Scott before suggesting the solution.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: