Closed Bug 2067248 Opened 2 months ago Closed 2 months ago

Setting homepage using | (vertical bar) no longer works with new schema

Categories

(Firefox :: Enterprise Policies, defect)

defect

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox-esr153 --- fixed
firefox157 --- fixed

People

(Reporter: mkaply, Assigned: mkaply)

References

Details

Attachments

(2 external files)

You used to be able to set multiple homepage with the | bar.

Not the best way, but for compatibility, we should try to keep it.

The url definitions in the policy schema use "format": "uri", which the
compliant validator implements as the RFC 3986 grammar. The previous validator
accepted whatever new URL() accepted, so URLs that administrators have always
been able to set are now rejected:

Add a "moz-url" string format backed by URL.canParse and point the url,
urlOrEmpty and origin definitions at it. Validators that do not know the format
ignore it, so the schema still drives external tooling.

Assignee: nobody → mozilla
Status: NEW → ASSIGNED

(In reply to Mike Kaply [:mkaply] from comment #0)

You used to be able to set multiple homepage with the | bar.

Do we know if anyone is hit by this or are we pre-empting issues to be sure?

We got a report on SUMO.

See Also: → 2067819
Attachment #9631825 - Attachment description: Bug 2067248 - Validate policy URLs with the URL parser rather than RFC 3986. r=bsmth → Bug 2067248 - Accept several pipe-separated homepages in the Homepage policy. r=bsmth
Regressions: 2068142
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch

browser.startup.homepage holds one URL or several separated by "|", and
administrators have long set the whole list as Homepage.URL rather than using
Additional. No JSON Schema format describes that value, and "uri" rejects "|"
outright, so the list no longer validates.

Give Homepage.URL a "moz-homepage-url-list" format: split on "|" the way
HomePage.sys.mjs splits the pref, and require every entry to parse as a URL.
The field hydrates to a normalized string instead of a URL object, since no
single URL object can hold a list.

Original Revision: https://phabricator.services.mozilla.com/D321965

(cherry picked from commit b924677bda6ba7a0d4a553ce328b778be89deacf)

Attachment #9646395 - Flags: approval-mozilla-esr153?
Attachment #9646395 - Flags: approval-mozilla-esr153? → approval-mozilla-esr153+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: