Closed
Bug 70303
Opened 24 years ago
Closed 24 years ago
Javascript: navigator.preference(); is not working
Categories
(Core :: Security, defect)
Tracking
()
People
(Reporter: blackhand, Assigned: security-bugs)
Details
Attachments
(1 file)
546 bytes,
text/html
|
Details |
In Netscape 4.xx I used the following code to set the user's home page to my
site.
netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWrite");
navigator.preference("browser.startup.homepage", "http://www.netscape.com/");
In Mozilla (Feb 20 & 26, 2001) the first line properly comes up with the site is
asking for extra rights, but the second line does not change the preference like
it should after clicking Grant.
According to this URL it was Implemented in JavaScript 1.2
http://developer.netscape.com:80/docs/manuals/js/client/jsref/nav.htm#1194000
The code above is in a function call from a button on a form with an onClick
handler.
Comment 1•24 years ago
|
||
Browser, not engine. Reassigning to DOM Level 0 -
Note similar issues were raised in bug 1073 and bug 7259.
blackhand@home.com, would you be able to attach a reduced testcase
to this bug (via "Create a new attachment" above)? A minimal HTML file
showing the problem would speed things along - thanks.
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
I just ran tests on Feb 26 & 27, 2001 and the security message box doesn't even
come up now like it did in the Feb 20th build.
Because the new builds are not working with this code at all, I tested it in
Netscape 4.76 to verify it works.
Comment 4•24 years ago
|
||
Thanks for this testcase! I'm going to reassign this to Security:General
so that Mitch can have a look. I'm not getting any security messagebox, either -
Assignee: jst → mstoltz
Status: UNCONFIRMED → NEW
Component: DOM Level 0 → Security: General
Ever confirmed: true
QA Contact: desale → ckritzer
Assignee | ||
Comment 5•24 years ago
|
||
Known bug; you need to enable both UniversalPreferencesRead and
UniversalPreferencesWrite in order to write to prefs.
Try
netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRead
UniversalPreferencesWrite");
as a workaround. This will be fixed after the DOM-to-XPConnect transition.
As for why you don't see the confirm dialog, either your script must be running
from the local drive or else it must be signed to enable privileges. This has
been true since 4.x.
*** This bug has been marked as a duplicate of 46691 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Comment 6•24 years ago
|
||
Marking VERIFIED DUPLICATE per bugzilla 46691 & engineer's comments.
You need to log in
before you can comment on or make changes to this bug.
Description
•