Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Comment Re:Script tags isn't enough. (Score 3, Informative) 142

Yes, you are absolutely right! However it seems the possible damage is very limited. I just tried this out and it works in both Firefox 1.5 and IE6, but surprisingly NOT in IE7. Here is what I did:

First I made a css class called test in a seperate .css file in which the background-image property had the following text:

background-image: url('javascript:window.location=\'http://www.googl e.com\'')

Then I just made a simple html page with a div tag of that class. When I navigated to the page, it almost instantly redirected to google. It also worked with putting the same text in the style attribute of a tag. However, I tried doing some other things, such as calling alert() and document.write(), and appending document.cookie to the url, but these all did not work. In firefox, the javascript console reported "Uncaught Exception: Permission Denied" on those scripts. IE6 and 7 simply did nothing. So while you can use this to screw up a page, it doesn't seem like you can do more serious things like session hijacking. But I agree with you that the best solution is just to strip all HTML.
User Journal

Journal Journal: Hello World!

yeah I've been reading slashdot for months but I decided to sign up today, go me

Slashdot Top Deals

A fanatic is a person who can't change his mind and won't change the subject. - Winston Churchill

Working...