Closed
Bug 570017
Opened 15 years ago
Closed 15 years ago
CSP report-uri with dotless host throws exception
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: bsterne, Assigned: geekboy)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.84 KB,
patch
|
bsterne
:
review+
dveditz
:
review+
|
Details | Diff | Splinter Review |
CSP WARN: couldn't parse report URI: http://bsterne/wordpress/wp-content/csp-process-report.php
[Exception... "Component returned failure code: 0x804b0050 (NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS) [nsIEffectiveTLDService.getBaseDomain]" nsresult: "0x804b0050 (NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS)" location: "JS frame :: file:///build/m-c/ff-debug/dist/bin/modules/CSPUtils.jsm :: anonymous :: line 181" data: no]
Assignee | ||
Comment 1•15 years ago
|
||
Dotless hosts don't play nice with the ETLD service... there's no "base domain" for a host that has no recognized TLD.
The fix involves watching for when the ETLD service throws a fit, then just do a string comparison on the host to be sure that the report URI is on the same host as "self". This is a fallback to same-origin restricting the report URI when the ETLD service isn't helpful.
Attachment #449110 -
Flags: review?(bsterne)
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Comment 2•15 years ago
|
||
Comment on attachment 449110 [details] [diff] [review]
fix
r=dveditz
Attachment #449110 -
Flags: review+
Reporter | ||
Updated•15 years ago
|
Attachment #449110 -
Flags: review?(bsterne) → review+
Reporter | ||
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•11 years ago
|
||
Is there any manual way to verify this fix or a script is required?
You need to log in
before you can comment on or make changes to this bug.
Description
•