Closed
Bug 123027
Opened 23 years ago
Closed 12 years ago
Verifier for prefs.js
Categories
(Core :: Preferences: Backend, enhancement)
Core
Preferences: Backend
Tracking
()
RESOLVED
INCOMPLETE
Future
People
(Reporter: d_king, Unassigned)
References
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.7+) Gecko/20020123
BuildID: 2002012304
From experience I've seen in other bugs, it would be nice if Mozilla had a way
to automatically (or manually) verify the contents of prefs.js. This would
prevent a rogue setting causing Mozilla to crash or do strange things.
Note: I probably got the Component setting all wrong, but I wasn't sure what
something like this would come under.
Comment 1•23 years ago
|
||
This is kind of what I was trying to suggest in bug 111684. This bug has a
better suggestion though.
Comment 2•23 years ago
|
||
The bug that prompted this had GetLocalizedUnicodePref being called on a
prefname whose value in prefs.js was "". Should't prefs throw an error on stuff
like that? (since a localized pref needs to have a uri to the properties file....)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 3•23 years ago
|
||
Yes, if a Mozilla process reads something from prefs.js and gets something
unexpected/invalid, it should produce an error rather than continuing on.
This may be a better idea (although affecting more code) than writing some
seperate process to verify everything. For code to self-verify what it gets from
prefs.js is, IMHO, better programming practice.
I don't know enough about the Mozilla codebase or the various things that can be
in prefs.js to be able to suggest which method is easier. I do realise, however,
that both options (fixed existing code or a seperate verifier) are big tasks so
I wouldn't expect to see this for a while.
Comment 4•23 years ago
|
||
A localized unichar pref gets it *default* value from a properties file. A value
of "" in prefs.js is perfectly valid as it would be the user set value.
Reporter | ||
Comment 5•23 years ago
|
||
If "" is a valid setting, then there is a problem as a "" breaks Javascript
external files. It may be valid, but it sure doesn't work as intended.
However, that is seperate from this bug, and I would suggest mentioning that in
Bug #118404. This bug is all about any invalid values in prefs.js
Comment 6•23 years ago
|
||
"" is a valid value syntactically for a localized pref. It is not a valid value
semantically for the charset pref, but there is no way of knowing that except by
knowing what the pref will be used for in Mozilla.
I think the suggestion is to have something that's almost a separate appliaction
that does semantic checking for all the prefs (and thus has knowledge of what
all the prefs are used for). This checker would, for example, flag as invalid
values for prefs that are supposed to be filenames that point to nonexistent
files....
Updated•23 years ago
|
Blocks: profile-corrupt
*** Bug 118495 has been marked as a duplicate of this bug. ***
Comment 8•22 years ago
|
||
Taking some of Brian's bugs.
Assignee: bnesse → ccarlen
Target Milestone: --- → Future
Reporter | ||
Comment 9•22 years ago
|
||
Hmmm, with "about:config" working, could that code be used to verify prefs.js?
Comment 10•21 years ago
|
||
*** Bug 195230 has been marked as a duplicate of this bug. ***
Updated•17 years ago
|
Assignee: ccarlen → nobody
QA Contact: bugzilla → prefs
Updated•15 years ago
|
QA Contact: preferences → preferences-backend
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•