EnablePrivilege not remembered - failure results

NEW
Assigned to

Status

()

Core
Security: CAPS
--
major
15 years ago
11 years ago

People

(Reporter: Dave Cline, Assigned: dveditz)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
For file system based script app.

Setting these:

 netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

and checking the "Remember this decision" does not remember.

For a file:///c:/... based HTML application using the XMLHttpRequest to fetch 
XML files from the file system setting these privileges enables the app to 
locally retrieve dynamic data and script. If one checks the "remember" check 
box the current browser session does indeed remember. But upon fully unloading 
Netscape 7 and returning to the same file system based HTML page - the security 
prompts are no longer displayed but the system then errors out with this error:

Error: uncaught exception: [Exception... "Component returned failure code: 
0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXMLHttpRequest.open]"  
nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS 
frame :: file:///C:/Documents%20and%
20Settings/dcline/Desktop/Testing/tests/PrivilegeSecurityBug/PrivilegeSecurity.h
tml :: performTest :: line 10"  data: no]

Error generating code:
  var xmlHttp = new XMLHttpRequest();
  xmlHttp.open("GET", "test.xml", false); /// LINE 10 ///
  xmlHttp.send(null);
  this.xml.loadXML(xmlHttp.responseText);

One must remove all Netscape preference files in order to have the security 
dialogs return.

/// SAMPLE ///
<html>
<body>
<script>
function performTest(){

  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

  var xmlHttp = new XMLHttpRequest();
  xmlHttp.open("GET", "test.xml", false);
  xmlHttp.send(null);
  alert(xmlHttp.responseText);
}	
</script>
<button onclick="performTest()">Perform Test</button>
</body>
</html>


/// test.xml ///
<root>
test data
</root>
...Netscape 7...

-> invalid

We accept only bug from mozilla.org builds. Please reopen if you can reproduce
this with our latest milestone (1.2a or a one week old nightly build) or report
this to Netscape. If you reopen add your used build ID in this bug report.


and no blocker of course (doesn't block mozilla development)

Severity: blocker → major
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
Summary: EnablePrivilege not remembered - failure results → EnablePrivilege not remembered - failure results
(Reporter)

Comment 2

15 years ago
Confirmed:
Mozilla 1.2b
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016

Quitting Mozilla fully, and deleting the prefs.js file will rectify the problem.

Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
-> Security:Caps
Assignee: asa → mstoltz
Status: UNCONFIRMED → NEW
Component: Browser-General → Security: CAPS
Ever confirmed: true
QA Contact: asa → bsharma
The unrecognized-path error is not generated by caps, but I will try to figure
out where it's coming from.
Status: NEW → ASSIGNED
(Assignee)

Updated

11 years ago
Assignee: security-bugs → dveditz
Status: ASSIGNED → NEW
QA Contact: bsharma → caps
You need to log in before you can comment on or make changes to this bug.