Closed
Bug 277658
Opened 20 years ago
Closed 20 years ago
Make error pages URL a pref
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
People
(Reporter: Biesinger, Assigned: vhaarr+bmo)
References
()
Details
Attachments
(1 file, 1 obsolete file)
2.07 KB,
patch
|
Biesinger
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
currently, the error page url is hardcoded in nsDocShell.cpp: 2847 errorPageUrl.AssignLiteral("chrome://global/content/netError.xhtml?e="); it would be nice if embeddors could specify a different URL - I was specifically asked by the epiphany people to offer such a way. I suggest using a pref for this. this would also allow overriding them by users, for better or worse. other possibilities would include a category entry, or a per-docshell setting (nsIDocShell::setErrorPageURL), but I think I like the pref best.
Reporter | ||
Updated•20 years ago
|
No longer blocks: errorpages
Comment 1•20 years ago
|
||
Pref sounds good to me.
Reporter | ||
Updated•20 years ago
|
Blocks: errorpages
Comment 2•20 years ago
|
||
Be careful about making this too easy - we don't want to allow malware to forward people to an advertising-filled page. Also, the error page must be local, otherwise it could become an endless loop.
Assignee | ||
Updated•20 years ago
|
Assignee | ||
Comment 3•20 years ago
|
||
First version. I use CharPref, because it was (not clearly) decided in #devs that a ComplexPref was not needed, as long as embeddors can encode any intl chars they'd want in there .. I don't think we need to take any special considerations on this as opposed to other prefs that have URIs in them, regarding security. If someone has access to the prefs, I think we'd have bigger problems in store than people getting sent on roundabouts or to ad sites. biesi: Can you review this?
Attachment #173019 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 4•20 years ago
|
||
Comment on attachment 173019 [details] [diff] [review] version 1.0 timeless kindly let me know that if (!prefBranch), I'm dereferencing random memory in + errorPageUrl.AssignASCII(errorPagePrefLocation); And suggested I use nsXPIDLCString instead of char for errorPagePrefLocation. He also asked if I could fixup the PR_FREEIF's to us nsMemory::Free, since that's what allocs them. I'll patch it tonight.
Attachment #173019 -
Attachment is obsolete: true
Attachment #173019 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 5•20 years ago
|
||
Updated as per comment #4
Assignee: cbiesinger → bugmail
Status: NEW → ASSIGNED
Attachment #173119 -
Flags: review?(cbiesinger)
Reporter | ||
Comment 6•20 years ago
|
||
Comment on attachment 173119 [details] [diff] [review] version 1.2 thanks.
Attachment #173119 -
Flags: superreview?(bzbarsky)
Attachment #173119 -
Flags: review?(cbiesinger)
Attachment #173119 -
Flags: review+
Comment 7•20 years ago
|
||
So... GetCharPref() only does ascii, no? How exactly are non-ascii URIs supposed to be done?
Assignee | ||
Comment 8•20 years ago
|
||
Yes, it only does ASCII .. We figured that it wasn't that important, and that people could encode intl chars if they needed them (although I'm not entirely sure what scheme you would use?). bz: If you're more comfortable with using GetCompexPref with an nsISupportsString, for example, I could do that ?
Comment 9•20 years ago
|
||
Comment on attachment 173119 [details] [diff] [review] version 1.2 Hmm... Right. This is a URI, so they can URI-escape the UTF8 (and should).
Attachment #173119 -
Flags: superreview?(bzbarsky) → superreview+
Assignee | ||
Comment 10•20 years ago
|
||
Checked in by silver%warwickcompsoc.co.uk. Thanks! Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•