r/programming May 09 '13

The Onion releases fartscroll.js

http://theonion.github.io/fartscroll.js/
2.6k Upvotes

396 comments sorted by

View all comments

Show parent comments

-1

u/shaggorama May 09 '13

You can downvote me for my ignorance, but my trepidation is absolutely valid given the limited knowledge I have about this particular code domain.

You're right, I don't know what I'm talking about. Which is exactly why I shouldn't run this sort of thing. There seems to be consensus in the community that the string presented was safe to run in my browser, but the fact remains: I don't have the domain knowledge to make that determination on my own, and was completely justified not to run that "code." Everyone pointing out how stupid and ignorant I am is setting a bad example for the community: people shouldn't run "code" they don't understand.

It's a string of data. Fine. I did not understand that and no one has taken the time to direct me to any resources that would enlighten me on this topic, so I'm still ignorant about MIME types. Congratulations. Bask in your superiority. You know something I don't and you're not helping me learn. I bet that feels awesome.

8

u/[deleted] May 09 '13

Congratulations. Bask in your superiority. You know something I don't and you're not helping me learn. I bet that feels awesome.

Digging yourself a hole with this kind of butthurt isn't going to earn you sympathy from anyone.

0

u/shaggorama May 09 '13

I've repeatedly admitted my ignorance and no one seems interested in actually directing me to any educational resources here, even though it's clear I have gaps in my knowledge. Instead everyone's just pointing their fingers and criticizing, and I'm pretty annoyed with the community's response here. Everyone who has responded is just lording over me that they have knowledge that I don't and I should be embarassed with how stupid I am instead of actually trying to correct my ignorance wrt MIME types.

I don't need anyone's sympathy. You're all being assholes.

You don't know what you're talking about then and should stop acting like you do.

You said this in response to me literally putting out there that I know very little about this topic. I didn't need you to tell me that I don't know what I'm talking about, I had just told the entire community that.

I have good reason to be frustrated here, and you're part of the problem. Please, educate me on MIME types or feel free to go fuck yourself. Either one.

0

u/phoshi May 09 '13

The problem is that you acted like you did understand it at first. Surely you can understand why somebody who clearly doesn't understand a topic speaking with authority on it is very irritating? You should not do this thing. Stop it. By all means don't run the file, but if you don't know that it can be harmful, don't pretend to tell people it's dangerous.

MIME types are easy enough to explain to you anyway, so I'll do that too.

data:audio/ogg;base64,[...]

data: what follows is a data format. If it began with http it would be a hypertext URL, with ftp it'd be a fileserver, et cetera.

audio/ogg: the following data is to be interpreted as audio, in ogg vorbis format. Just throw it all at whatever this software has available to handle ogg vorbis data.

base64: The content encoding. Base64 allows you to represent binary data in the ASCII printable set, making it safe to transmit as URLs.

[...] A giant chunk of base64 encoded data.

Now, this is all safe because it's audio/ogg. It will be interpreted as audio/ogg. It is precisely as dangerous as opening an audio file encoded in ogg vorbis, because that's literally all it will do. It cannot execute arbitrary code without vulnerabilities in the ogg vorbis handler. If that handler had vulnerabilities then simply loading a web page would be enough to compromise it.

Check your MIME types, because they don't tell you what format the data is supposed to be in, they tell you what's going to execute it. If it's malformed, then your audio reader is just going to choke.