Closed Bug 51231 Opened 24 years ago Closed 24 years ago

bookmarklets no longer work

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: pat, Assigned: security-bugs)

References

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.13 i686; en-US; m18) Gecko/20000903
BuildID:    2000090306

bookmarklets (i.e. javascript: URL inside a bookmark, e.g. on the personal
toolbar) are not longer working

Reproducible: Always
Steps to Reproduce:
1. create a bookmarklet, e.g. use ´javascript:alert("foo");´ as URL
2. click on bookmarklet, execute code
 (javascript needs to be on for this)

Actual Results:  nothing happens.

Expected Results:  an alert box pops up.

The shell spits out the following:


JavaScript error:
 line 0:

JavaScript error:
 line 0: uncaught exception: [Exception... "Access to property denied"  code:
"1010" nsresult: "0x805303f2 (NS_ERROR_DOM_PROP_ACCESS_DENIED)"  location:
"<unknown>"]

Error loading URL javascript:alert("foo");: 805303f5
->dom0
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
*** Bug 51426 has been marked as a duplicate of this bug. ***
Confirming bug.

Also note, in 51426 I mentioned that this only reliably affects the top-level
browser window.  If you open a second or third, one of them will magically work.
 I wasn't certain that the second-level window worked all of the time, but
definitely some of the time.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Seems like the security constraints for JS executed from javascript: URL's in
bookmarks is a bit tighter than it was in 4.x, reassigning to mstoltz for futher
investigation.
Assignee: jst → mstoltz
What's needed is to make sure that when DocShell->LoadURI gets called as a result 
of a bookmark click, we get the principal (owner) of the current document and 
pass it to docshell as part of the LoadInfo argument. In most cases this data is 
available, but sometimes it isn't. I probably won't have time to fix this, so I'm 
marking it HELP WANTED.
Whiteboard: [HELP WANTED]
Fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: [HELP WANTED]
Target Milestone: --- → M18
*** Bug 51862 has been marked as a duplicate of this bug. ***
Verified with 2001-02-06-08.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.