5

If you click on the Post on the top right, then drop an image onto the box, Facebook will fail to recognize it as an image and tries to read it as a link. This is not the main point though.

The weird part is that it knows what the fullpath is.

enter image description here

This shouldn't be happening since Chrome is sandboxed, and every path, in theory, should be changed to "fakepath" for security reasons.

Somehow Facebook managed to do that. But the question is, how?

Community
  • 1
  • 1
Derek 朕會功夫
  • 84,678
  • 41
  • 166
  • 228

1 Answers1

4

Windows XP sends the whole path with the content type text/uri-list.

Here's a snippet that reproduces this fact:

<textarea ondrop="console.log(event.dataTransfer.getData('text/uri-list')); event.preventDefault();">
</textarea>
copy
  • 3,084
  • 1
  • 27
  • 33