Policy URL fields reject URLs the URL parser accepts (IDN hosts, non-ASCII paths, spaces)
Categories
(Firefox :: Enterprise Policies, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | 158+ | fixed |
| firefox156 | --- | wontfix |
| firefox157 | --- | wontfix |
| firefox158 | + | fixed |
| firefox159 | --- | fixed |
People
(Reporter: mkaply, Assigned: mkaply)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 external files)
The url, urlOrEmpty and origin definitions in browser/components/enterprisepolicies/schemas/policies-schema.json use "format": "uri", which the compliant validator implements as the RFC 3986 grammar. The previous validator accepted any string new URL() could parse, so URL values administrators have always been able to set are now rejected:
- IDN hosts,
https://münchen.example/ - non-ASCII paths,
https://a.example/über - paths, queries and fragments containing a space,
{,},^or a double quote
Every url-typed field is affected - Bookmarks, Permissions origins, ExtensionSettings install_url, Proxy, AppUpdateURL. Depending on the field, the entry is dropped or the whole policy fails; either way the administrator sees the policy silently not apply.
RFC 3986 is not the rule Firefox enforces when it loads these URLs - the URL parser is. Validating them the way Firefox will actually parse them (e.g. a custom format backed by URL.canParse) restores the previous contract, but it trades away a standard format keyword that other tooling such as the enterprise console understands, so the approach needs a decision rather than just a patch.
Regressed by bug 2044429. Homepage.URL additionally accepts several URLs separated by |; that quirk is being handled separately in bug 2067248.
Comment 1•2 months ago
|
||
The severity field is not set for this bug.
:mkaply, could you have a look please?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•2 months ago
|
||
Not high severity until someone complains :)
Comment 3•2 months ago
|
||
:mkaply, looks like Bug 2074747 is a duplicate of this?
Adding to See Also since I wasn't sure. We can dup it over once you have a chance to confirm.
| Assignee | ||
Comment 5•2 months ago
|
||
yes. I'll fix.
Updated•2 months ago
|
| Assignee | ||
Comment 6•2 months ago
|
||
Updated•2 months ago
|
Comment 9•2 months ago
|
||
Backed out for causing xpc failures @ test_extensionsettings_install_without_url.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/f618097a7405e497b57ef171cdffce5b5a6e5976
| Assignee | ||
Comment 10•2 months ago
|
||
The thing I landed before this depended on the old behavior somehow. Checking.
Comment 11•2 months ago
|
||
Set release status flags based on info from the regressing bug 2044429
Comment 12•2 months ago
|
||
Comment 13•2 months ago
|
||
| bugherder | ||
Comment 14•2 months ago
|
||
The patch landed in nightly and beta is affected, along with ESR.
:mkaply, please make an uplift decision for beta and ESR:
- For beta, nominate the patch for beta uplift approval if the fix should be included in this release, or set
status-firefox158towontfixif the fix can wait for the next release. - For ESR, nominate the patch for the appropriate ESR uplift approval if the fix should be included in ESR, or set the ESR status flag(s) to
wontfixif an uplift isn't needed. Each affected ESR release needs a decision.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 15•1 month ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D328648
Updated•1 month ago
|
Comment 16•1 month ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Enterprise policy URLs that Firefox can load (IDN hosts, non-ASCII paths, spaces, and %PLACEHOLDER% values in AppUpdateURL) are rejected, so those policies silently don't apply. Regression from bug 2044429.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Restores the previous rule of accepting any URL the URL parser accepts. Limited to enterprise policy validation.
- String changes made/needed?: None
- Is Android affected?: no
| Assignee | ||
Comment 17•1 month ago
|
||
Updated•1 month ago
|
Comment 18•1 month ago
|
||
firefox-esr153 Uplift Approval Request
- User impact if declined/Reason for urgency: Enterprise policy URLs that Firefox can load (IDN hosts, non-ASCII paths, spaces, and %PLACEHOLDER% values in AppUpdateURL) are rejected, so those policies silently don't apply. This broke self-hosted AppUpdateURL configurations moving from 140 to 153 (bug 2074747). Regression from bug 2044429.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Restores the previous rule of accepting any URL the URL parser accepts. Limited to enterprise policy validation. Rebased: the only conflict was a test file for an update_url feature not on ESR.
- String changes made/needed?: None
- Is Android affected?: no
Updated•1 month ago
|
Updated•1 month ago
|
Comment 19•1 month ago
|
||
| uplift | ||
Updated•1 month ago
|
Updated•1 month ago
|
Comment 20•1 month ago
|
||
| uplift | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Description
•