New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 890462 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Upload LOCAL Images to other Websites with JS

Reported by davidsca...@gmail.com, Sep 28

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

Steps to reproduce the problem:
You can get the Base64 of an Image:
<img id="preview">
<canvas id="myCanvas">
<script>
var img = document.getElementById("img");
img.src = "file:///home/david/Firefox_wallpaper.png";
var c = document.getElementById("canvas");
var ctx = c.getContext("2d");
ctx.drawImage(img, 10, 10);
alert(c.toDataURL());
</script>

You would need to specify a full file Url.
But you get grab the user url with window.location ans split. With that information you can then get the wall paper/user windows profile icon. Or try to check for common thinks as Dropbox/DCIM/001.png.
With this trick you can also check if file exists so you can check what programs are installed. Maby on what sites the user were (check if browser cache file exists).

You could now upload the Base64 to a server.
But still if i open a html file i would not expect that it can do such stuff...

What is the expected behavior?

What went wrong?
You can upload Images/check what programs are installed etc.

Did this work before? No 

Chrome version: Google Chrome	69.0.3497.92 (Official Build) (64-bit) Revision	eb2c6d16bcb960cc5c322243c1771713460c4bcf-refs/branch-heads/3497@{#921} OS	Linux JavaScript	V8 6.9.427.22 Flash	30.0.0.154 /home/david/.config/google-chrome/PepperFlash/30.0.0.154/libpepflashplayer.so User Agent	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36 Command Line	/usr/bin/google-chrome-stable --flag-switches-begin --flag-switches-end Executable Path	/opt/google/chrome/google-chrome Profile Path	/home/david/.config/google-chrome/Default  Channel: stable
OS Version: 
Flash Version:
 
Components: -Blink Blink>Canvas
Labels: Needs-Triage-M69
Cc: krajshree@chromium.org
Labels: Needs-Feedback Triaged-ET
davidscandurra@ - Thanks for filing the issue...!!

Could you please provide a sample test file/url to test the issue from TE-end. This will help us in triaging the issue further.

Thanks...!!
Status: WontFix (was: Unconfirmed)
cross domain reading is not possible. This only works on your example because you have a file:// web page with a file:// image. If you find an example where a page  served on a real web server can read a file:// url as base64, please reopen.
Sure you would have to open an html file. But still it I open a html file I would not suspect that it can upload my files to an external server.

Sign in to add a comment