How to assign the value of document.cookie to your browser cookies?

Posted by Ricket on Stack Overflow See other posts from Stack Overflow or by Ricket
Published on 2010-06-10T16:59:17Z Indexed on 2010/06/10 17:02 UTC
Read the original article Hit count: 196

Filed under:
|

I'm a developer (and therefore a tester) of a website. Our site accepts any JavaScript or HTML from an user but I haven't been successful in explaining the danger of it, as obvious as it is. So I would like to prove it by logging in as my boss to prove to him that there is definitely a real danger here. I think this will put down any of his arguments and let us move onto filtering content like this. (note this question is not about filtering, or other suggestions on JavaScript tricks)

I already know how to steal the value of the document.cookie variable with AJAX and a PHP file, but once you have that string of name=value;name=value;..., how do you apply it to your own browser?

This is programming related because I am asking about tools which will help me debug my web program.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about xss