[EMAIL PROTECTED] wrote:
I think we have been a little bit on different wavelengths. I presumed
that what I was seeing was a common issue that others already had a
solution for, and that it was not necessarily a bug. So this is great,
we're finally on the same wavelength.

OK, sounds good!

To get to your specifics, the approach is the latter of your two
above. The specific code is:
 document.getElementById
(IFRAMEnum).contentDocument.documentElement.innerHTML

Odd.  Here's a test document I wrote up:

<!DOCTYPE html>
<html>
  <head>
    <script>
      function doIt() {

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

alert(document.getElementsByTagName("iframe")[0].contentDocument.documentElement.innerHTML);
      }
    </script>
  </head>
  <body onload="doIt()">
    <iframe src="http://web.mit.edu/bzbarsky/www/test.html";></iframe>
  </body>
</html>

When I run it from file and allow the privileges, it works. If I do the same, but change the iframe to point to Google and run the file from web.mit.edu, and put the following in prefs.js:

user_pref("capability.principal.codebase.p0.granted", "UniversalBrowserRead UniversalBrowserWrite");
user_pref("capability.principal.codebase.p0.id", "http://web.mit.edu";);
user_pref("capability.principal.codebase.p0.subjectName", "");
user_pref("signed.applets.codebase_principal_support", true);

then it also works (and I don't get prompted or anything, just get the alert). This is all in Firefox 2.0.0.18.

So what's different in your setup?

-Boris
_______________________________________________
dev-security mailing list
dev-security@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-security

Reply via email to