Remove website URL ending with a dot character from the history
Categories
(Toolkit :: Places, defect, P2)
Tracking
()
People
(Reporter: miljan.miljan, Assigned: yazan)
References
(Blocks 2 open bugs)
Details
(Keywords: privacy, Whiteboard: [sng][places-privacy])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr128+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0
Steps to reproduce:
I tried to delete or forget a website which URL is ending with a dot character. The URL is https://rts.rs.
Also, https://rt.rs.
Actual results:
Could not delete it from the history.
Expected results:
Website to be deleted from the history.
Comment 1•1 year ago
|
||
I can reproduce the issue 115.12.0esr, 127.0.2, 128.0b9 as well as Nightly129.0a1 Windows11.
STR:
- Visit https://bugzilla.mozilla.org./home , https://bugzilla.mozilla.org./home?GoAheadAndLogIn=1 and https://bugzilla.mozilla.org./page.cgi?id=etiquette.html
- Open Library
- Try to
Forgot About This Site...on the history item
Actual results:
TypeError: Expected well formed hostname string for `host` with atmost 1 wildcard. History.sys.mjs:586:13
removeByFilter resource://gre/modules/History.sys.mjs:586
deleteByHost resource://gre/modules/ClearDataService.sys.mjs:1112
deleteByBaseDomain resource://gre/modules/ClearDataService.sys.mjs:1123
deleteDataFromBaseDomain resource://gre/modules/ClearDataService.sys.mjs:2087
promises resource://gre/modules/ClearDataService.sys.mjs:2201
map self-hosted:178
promises resource://gre/modules/ClearDataService.sys.mjs:2200
map self-hosted:178
_deleteInternal resource://gre/modules/ClearDataService.sys.mjs:2198
deleteDataFromBaseDomain resource://gre/modules/ClearDataService.sys.mjs:2086
errorCount resource://gre/modules/ForgetAboutSite.sys.mjs:29
removeDataFromBaseDomain resource://gre/modules/ForgetAboutSite.sys.mjs:28
forgetAboutThisSite chrome://browser/content/places/controller.js:1428
AsyncFunctionNext self-hosted:807
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "Expected well formed hostname string for `host` with atmost 1 wildcard." {file: "resource://gre/modules/History.sys.mjs" line: 586}]'[JavaScript Error: "Expected well formed hostname string for `host` with atmost 1 wildcard." {file: "resource://gre/modules/History.sys.mjs" line: 586}]' when calling method: [nsIClearDataService::deleteDataFromBaseDomain]
errorCount resource://gre/modules/ForgetAboutSite.sys.mjs:29
removeDataFromBaseDomain resource://gre/modules/ForgetAboutSite.sys.mjs:28
forgetAboutThisSite chrome://browser/content/places/controller.js:1428
Updated•1 year ago
|
Comment 2•1 year ago
|
||
Hey Marco, could you verify why this is throwing in the places component?
Comment 3•1 year ago
•
|
||
The regex at https://searchfox.org/mozilla-central/rev/3d173a6ad865eb778eb7a85de900e92774559ed6/toolkit/components/places/History.sys.mjs#583 doesn't assume this case.
It's not really common on the Web to use absolute host names, it's more common in other network communications (or dns).
Though, they clearly work as demonstrated in comment 1.
We should update the regex to allow an optional trailing dot.
And we should file a follow-up to evaluate merging them, I see currently we consider bugzilla.mozilla.org. different from bugzilla.mozilla.org but, while technically true, for our scopes we should probably normalize the URL removing the trailing dot and merge them.
Comment 4•1 year ago
|
||
Moving the bug to Places as it's not due to the sanitization code.
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Comment 7•1 year ago
|
||
| bugherder | ||
Comment 8•1 year ago
|
||
The patch landed in nightly and beta is affected.
:yazan, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox129towontfix.
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D216355
Updated•1 year ago
|
Comment 12•1 year ago
|
||
esr128 Uplift Approval Request
- User impact if declined: Cannot remove site from history
- Code covered by automated testing: yes
- Fix verified in Nightly: no
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: see comment 1
- Risk associated with taking this patch: low
- Explanation of risk level: it's a regular expression change making an API a bit more lenient
- String changes made/needed: none
- Is Android affected?: no
Updated•1 year ago
|
Updated•1 year ago
|
Comment 13•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
I was able to reproduce the issue using Firefox 129.0b1 on Windows 11, while following the steps described in Comment 1.
Verified as fixed using Firefox 130.0-RC1 and Firefox 128.2.0esr, on macOS 14.6, Windows 11 and Ubuntu 22.04. https://bugzilla.mozilla.org./home , https://bugzilla.mozilla.org./home?GoAheadAndLogIn=1 and https://bugzilla.mozilla.org./page.cgi?id=etiquette.html are deleted from History by using the 'Forgot About This Site...' option.
Updated•10 months ago
|
Description
•