Feature Enhancement | add support for 'asyncBlocking' in chrome.webRequest.onBeforeRequest
Reported by
assaf.al...@gmail.com,
Dec 19
|
|||||
Issue descriptionUserAgent: 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 an enterprise 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 and our Chrome extension needs to call an external C++ process which we do using a native messaging process. 6. The call to the external C++ native messaging process is done using port.postMessage() and this call is asynchronous which means that our extension does not wait to get a response and the file/text upload is completed. What is the expected behavior? Our product is an enterprise product with hundreds of fortune 500 customers that use the product to prevent employees stealing confidential data of the company. Our Chrome extension needs to communicate with an external process to determine IF the WebRequest needs to be blocked or allowed. Since the port.postmessage is asynchronous the product cannot block the request and by the time the response of the port.postmessage function return asynchronously the file or text has already been uploaded... we need Chrome API to be extended to support AsyncBlocking similar to how Firefox 52 and onward provides a similar functionality https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/onBeforeRequest What went wrong? Chrome API webRequest.onBeforeRequest does not support asyncBlocking NOR synchronous blocking so by the time our product returns a a response to BLOCK the file (or text) are already uploaded so it is too late and the data is stolen. 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:
,
Dec 19
,
Dec 19
,
Dec 20
Thanks for filing the issue... As per comment #0, it seems to be a feature request. Hence, marking it as untriaged for further inputs from Dev team. Thanks..!
,
Dec 21
@1 described our concerns pretty well - doing this in a performant fashion is hard, and it could much more easily lead to a terrible user experience. It is possible that we would allow enterprise extensions to do this, since there is less concern there. However, it's not something the extensions team will get to in the near future. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by woxxom@gmail.com
, Dec 19