New issue
Advanced search Search tips

Issue 916485 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature



Sign in to add a comment

Feature Enhancement | enhance WebRequest.onBeforeRequest() API to provide uploaded files meta-data and content

Reported by assaf.al...@gmail.com, Dec 19

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce the problem:
1. we created a Chrome extension 
2. In the Chrome extension we use chrome.WebRequest.onBeforeRequest.addListener function to receive a call before file uploads and form-text posting (see https://developer.chrome.com/extensions/webRequest#event-onBeforeRequest)
3. Open dropbox.com or gmail.com or box.com (or any other web-application that allows to attach/upload files to a web-application)
4. upload a file to the web-application using drag&drop or using file-browse dialog
5. the onBeforeRequest callback function in our Chrome extension is called by Chrome BUT it does NOT contain essential meta-data information about the file that is uploaded to be able to recognize the file. 

What is the expected behavior?
the expected behavior is that the above Chrome API will be enhanced to provide the following meta-data via the "details" parameter of the callback function:
1. filename
2. file size
3. modification date
4. (optional) full path to the file

The goal is to be able to detect the on the local file system the specific file(s) that was uploaded in order to protect organizations from data leakage via Chrome browser

What went wrong?
The Chrome API does not provide the meta-data information for files that are uploaded.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 71.0.3578.98  Channel: stable
OS Version: 10.0
Flash Version: 

the following 2 APIs do provide the meta-data information such as filename(with fake-path), size and modification date
1. document.addEventListener("drop", function(event)
2. document.addEventListener('change', function(event)

More info:
https://developer.mozilla.org/en-US/docs/Web/Events/drop has a parameter dataTransfer that contains the info.
https://developer.mozilla.org/en-US/docs/Web/Events/change has a event.target.files array that includes the list of uploaded files meta-data.
 
Components: Platform>Extensions>API
Labels: Needs-Triage-M71
Cc: susan.boorgula@chromium.org
Labels: -Type-Bug Triaged-ET FoundIn-73 Target-73 M-73 FoundIn-71 FoundIn-72 OS-Linux OS-Mac Type-Feature
Status: Untriaged (was: Unconfirmed)
assaf.almaz@ Thanks for the issue.

As per the above description, this is a feature request to allow to enhance WebRequest.onBeforeRequest() API to provide uploaded files meta-data and content.
Hence marking this as Untriaged for further updates from Dev.

Thanks..
Status: Available (was: Untriaged)
This isn't something the extensions team will get to in the near future.  If someone wants to tackle this, the first step would be in figuring out what would be necessary to plumb these bits through, and whether all the information is available at the time onBeforeRequest is dispatched.
Adding to c#4. I don't see why this should belong on the web request api. Also, it might be helpful if you list why the web apis you listed (drop, change) do not suffice for your use case.

Sign in to add a comment