Re:Stacksort – Searches StackOverflow for sorting functions ...
by Uehreka on Monday November 05, 2018 @11:30AM
(#18383602)
This is why GitHub uses a separate domain (github.io as opposed to github.com) for user sites.
Re:Stacksort – Searches StackOverflow for sorting functions ...
by floil on Monday November 05, 2018 @12:11PM
(#18383936)
Moreover, github.io is in the public suffix list, so it is effectively a TLD (foo.github.io is a different site from bar.github.io; they can't become same origin by means of document.domain).
The risk of eval() is giving control of the site data of foo.github.io to the author of a stackoverflow comment.
The warning is part of the fun, though.
Re:Stacksort – Searches StackOverflow for sorting functions ...
by _puk on Monday November 05, 2018 @12:43PM
(#18384238)
Github hasn't always used a seperate domain for user sites [0].
They do now to directly address the GP's concerns.
http://homakov.blogspot.com/2013/03/hacking-github-with-webk...
The way you would do this is create an answer to one of these questions on stack overflow that includes malicious javascript.
However, it's kind of unlikely there is much you can do with it. Sometimes a site will share cookies with subdomains, but this is not likely for github because you are allowed to publish arbitrary js there, so that would be a huge security hole.