Re:A file that’s both an acceptable HTML page and a JPEG (2012)
by 3chelon on Monday September 10, 2018 @06:10AM
(#17950666)
The first thing to cross my mind when I saw this was XSS vulnerabilities. Presumably there's nothing to stop this page running JS?
[ Parent
| on HN ]
Re:A file that’s both an acceptable HTML page and a JPEG (2012)
by kenbellows on Monday September 10, 2018 @06:19AM
(#17950700)
Assuming you can include JS in the file, I imagine it would only run if the file was being parsed as HTML at the moment, not when parsed as a JPEG. That's the main point here: this file can be interpreted in two ways, but the data in it is treated very differently and has different effects depending on the way it's currently interpreted.