Christian Paminger wrote:
>>I'm using Mozilla 1.7.2 and want to use Drag and Drop in my remote
>>Application. I don't want to use signed code.
>>
>>user_pref("signed.applets.codebase_principal_support", true);
>>doesn't seem to work.
What errors do you get in the javascript console? Have you tried using the
Javascript debugger?
> netscapte.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Does your real app have this typo? ("netscapte")
enablePrivilege() puts a notation on the stack; when you exit the block in
which it's called that notation is removed and you no longer have the
privilege enabled.
You will need to put this call at the top of each event handler. The user
will see the confirmation dialog only once and the answer will be remembered
for the session, but your code has to call it each time it's needed.
> When I start it with
> C:\Programme\Mozilla>mozilla.exe -chrome chrome://dragdrop/content
> all works fine.
"chrome:" urls get magic permissions (in effect UniversalXPConnect is
already granted). Your code isn't working, but the extra privileges are
masking the failure.
> This doesn't work.
> C:\Programme\Mozilla>mozilla.exe -chrome
> file://c:/programme/mozilla/chrome/dragdrop/content/dragdrop.xul
file: urls don't get any extra privileges, so your enablePrivilege() calls
need to be in the right spot.
> I set user_pref("signed.applets.codebase_principal_support", true);
> in my prefs.js and insert
> netscapte.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Again with the typo -- that also could be your problem. Check the Javascript
console and use the Javascript debugger.
-Dan Veditz
_______________________________________________
Mozilla-security mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-security