I want my service to have such a feature: author can fully customize the page, but can't steal users' cookies.
Tumblr had some troubles with that, but solved them successfully http://www.riyazwalikar.com/2012/07/stored-persistent-xss-on-tumblr.html
So I need the solution with
As I understand tumblr:
Can I have secure and comfortable for users solution? Is cookie-theft the main issue of full access to html?
I want my service to have such a feature: author can fully customize the page, but can't steal users' cookies.
So I guess that you want to enable javascript for them but you do not want to allow manipulating cookies. This should be simple: just place it before the user's page loads:
if (document.__defineGetter__)
{
document.__defineGetter__("cookie", function () { return ""; } );
document.__defineSetter__("cookie", function () { } );
}
else // IE
{
Object.defineProperty(document, "cookie",
{
get: function () { return ""; },
set: function () { return true; },
});
}
users are still authenticated on each subdomain (HOW??? www.tumblr.com js has access to main session cookies? Is that secure?)
This is also simple - cookies supports this. Its domain
attribute:
Set-Cookie: name=value; path=/; domain=.example.com
auth cookies should be httponly?..
Of course - they should be for the better security.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With