Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome extension via GPO cannot open local file URLs #9411

Closed
Rob--W opened this issue Jan 26, 2018 · 0 comments
Closed

Chrome extension via GPO cannot open local file URLs #9411

Rob--W opened this issue Jan 26, 2018 · 0 comments

Comments

@Rob--W
Copy link
Member

Rob--W commented Jan 26, 2018

When an extension is installed via group policies in Chrome, a user cannot grant the extension access to local file URLs. The checkbox is simply not visible, and there is no way for admins to allow files: https://bugs.chromium.org/p/chromium/issues/detail?id=173640

So when the extension detects a PDF file, the following page is shown (from #6233):

But the user has no way of allowing this access. There should be some work-around to this problem, even if it is an <input type=file> to select the file (or a preference to disable interception of local files).

Rob--W added a commit to Rob--W/pdf.js that referenced this issue Mar 21, 2018
Test case to exercise the different encodings:
1. Create a file "some file#@%M<br>%25 .pdf"
2. Build the extension with `gulp chromium` and load it in Chrome.
3. Go to `chrome://extensions/` and ensure that the
   "Allow access to file URLs" is disabled.
4. Try to open the file from step 1 in Chrome (maybe reload once).
5. PDF.js should be showing a file chooser button.
6. Click on that button and select a different file.

   Test: Check that a confirmation dialog pops up that warns about
   a different file name. Cancel the dialog.

7. Click on the button again and select the original file.

   Test: Check that the file opens as expected.
movsb pushed a commit to movsb/pdf.js that referenced this issue Jul 14, 2018
Test case to exercise the different encodings:
1. Create a file "some file#@%M<br>%25 .pdf"
2. Build the extension with `gulp chromium` and load it in Chrome.
3. Go to `chrome://extensions/` and ensure that the
   "Allow access to file URLs" is disabled.
4. Try to open the file from step 1 in Chrome (maybe reload once).
5. PDF.js should be showing a file chooser button.
6. Click on that button and select a different file.

   Test: Check that a confirmation dialog pops up that warns about
   a different file name. Cancel the dialog.

7. Click on the button again and select the original file.

   Test: Check that the file opens as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants