Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
1–10 of 86 posts
Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#2Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#3I'm curious whether the multiple warnings about running untrusted code in the browser are necessary. I feel like all websites are already untrusted code, and the browser is quite well sandboxed and protected from anything too bad happening. What is the worst case scenario here for the user within the JS ecosystem, under known avenues of attack, not counting an unknown zero day browser exploit?
Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#4Hilariously awesome. I'm curious whether the multiple warnings about running untrusted code in the browser are necessary. I feel like all websites are already untrusted code, and the browser is quite well sandboxed and protected from anything too bad happening. What is the worst case scenario here for the user within the JS ecosystem, under known avenues of attack, not counting an unknown zero day browser exploit?
Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#5The first answer that apparently works has a comment stating that it fails with more than 2 duplicates; indeed I tried a list with three 3s and the resulting passing answer only had one of those threes.
Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#6Click the button and PRAY this thing doesn't load any sketchy code
Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#7Hilariously awesome. I'm curious whether the multiple warnings about running untrusted code in the browser are necessary. I feel like all websites are already untrusted code, and the browser is quite well sandboxed and protected from anything too bad happening. What is the worst case scenario here for the user within the JS ecosystem, under known avenues of attack, not counting an unknown zero day browser exploit?
I can't speak to the worst case scenario as I'm not very knowledgeable about browser sandboxing or what JS can['t] do in a given context. But as a developer I do think there's a pretty significant difference between running code that someone wrote on their own website and loading arbitrary code from a third party then executing that without any human looking at the code.
Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#8Earlier quoted context omitted.
I can't speak to the worst case scenario as I'm not very knowledgeable about browser sandboxing or what JS can['t] do in a given context. But as a developer I do think there's a pretty significant difference between running code that someone wrote on their own website and loading arbitrary code from a third party then executing that without any human looking at the code.
That’s more or less what all iframed ads are. Plus most popular web sites load libraries for services where the site owners can’t easily see what’s happening under the covers. Google analytics would be an example of this, but there are many , and lots of sites use multiple such services.
Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#9Re: Stacksort – Searches StackOverflow for sorting functions and runs them (2013)
#10["zebra","apple","banana","5","bapple","banana","banana"]
Correction, the page finally found this algorithm that sorts my array[1]. So I am disappointed with the verifier function on this web page and may need to submit a PR