javascript: protocol security violations

D

Dom Leonard

Hi all,

I occasionally use the javascript protocol in window.open to retrieve a
window property of the opener for use as HTML source:

window.htmlSrc="<html>...blah ....<\/html>";
window.open("javascript:eek:pener.htmlSrc", testWindow);

The technique was absolutely needed in NS4.xx to overcome reentrancy
problems with document.writing to generated windows, and has been useful
for testing and some cross browser DHTML work since.

Currently Opera 7.11 refuses to honor the protocol with a security
violation errror, Mozilla has been refusing to allow window reload from
the generated window for some time, and Moz 1.4 is generating
informative security warnings. Basically it looks like the javascript
protocol is about to become dead sooner rather than later.

Does anyone else consider this security error a result of simplistic
treatment of the javascript protocol when implimenting same domain policy?

Are there real security issues with the javascript protocol that are
additional to being able to execute window.open on somebody else's
domain sourced page in the first place?

Does anyone care or should we just let it die?


Personally I would prefer to see the javascript: protocol standardised
rather than discarded, but that much may be obvious! :)

Cheers,
Dom
 
J

Jim Ley

Basically it looks like the javascript
protocol is about to become dead sooner rather than later.

It was never really alive for doing this kind of stuff IMO.
Does anyone else consider this security error a result of simplistic
treatment of the javascript protocol when implimenting same domain policy?

Perhaps, but the problem is there have been hundreds of security holes
built around using javascript protocol, since there's no sane reason
for wanting to do it, it will be generally unreliable, and it will
remove some of the holes without having to think, it seems to make
sense that they've disabled it.
Personally I would prefer to see the javascript: protocol standardised
rather than discarded, but that much may be obvious! :)

Then take it to the IETF... You have as much right as anyone else. a
javascript uri scheme registration wouldn't appear to be tough to
write...

Jim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top