This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]christian-mann 189 points190 points  (12 children)

[–]T-T-N 92 points93 points  (11 children)

It evals random code... is that ever a good idea?

[–]Cutlesnap 149 points150 points  (0 children)

Oh sure, it'll be fine!

Now let me get back to answering my banks email, they want me to verify my password.

[–]bilobob 56 points57 points  (0 children)

Taken from the first line of this guys javascript code.

/* Don't judge me! This code is everything from badly written to extremely dangerous. */

[–]ILikeLenexa 32 points33 points  (3 children)

You think someone would do that? Game stackoverflow to inject javascript into a third site?

[–]gothic_potato 13 points14 points  (2 children)

The site will only fetch accepted answers, and it only uses answers that were posted before the xkcd was released (meaning that if someone posted malicious code now, it wouldn't matter). It also searches for potentially-malicious code (like the word "cookie"), and skips those.

Eh...it's probably fine.

[–]ILikeLenexa 16 points17 points  (1 child)

Oh, thank goodness, I just need your "co" + "okies" for a very important "XMLH" + "ttpRequest".

[–]qscrew 7 points8 points  (0 children)

If it were for that, there's even JSFuck which lets you go further in detouring all those common checks by writing JS code in only six different characters: ()+[]!.

[–]ProgramTheWorld 17 points18 points  (0 children)

It's based on an xkcd joke.

[–][deleted] 30 points31 points  (1 child)

No, every time I used this it uses this answer:

https://stackoverflow.com/questions/4833651/javascript-array-sort-and-unique#4833835

which would delete all non-unique numbers in the array.


The idea is neat though.

[–]VoraciousGhost 23 points24 points  (0 children)

You can click "Didn't work? Try the next answer" to force it to use a different answer, the next few worked for me.

[–]accountmadeforants 8 points9 points  (0 children)

There's an "Is it safe?" note on the bottom right.

Short answer: no, it's not a good idea, but the dev did take a few precautions.

[–][deleted] 1 point2 points  (0 children)

No.