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

PDFs fail to load if behind basic auth #1788

Closed
bsclifton opened this issue Oct 23, 2018 · 10 comments · Fixed by brave/brave-core#784
Closed

PDFs fail to load if behind basic auth #1788

bsclifton opened this issue Oct 23, 2018 · 10 comments · Fixed by brave/brave-core#784

Comments

@bsclifton
Copy link
Member

bsclifton commented Oct 23, 2018

Carried over from brave/browser-laptop#8702

If a pdf file is behind basic auth, then it fails to display with our pdfjs extension.

Steps to reproduce:

  1. Download this script and extract it to your home directory
    SimpleHTTPAuth.py.zip. Create a pdf file named type.pdf in the same directory.

  2. Start it python SimpleHTTPAuth.py 9001 u:p

  3. Navigate to http://localhost:9001/type.pdf

Note it works in Chrome with pdfjs but not in Brave built in.

CC @diracdeltas

@diracdeltas
Copy link
Member

diracdeltas commented Oct 23, 2018

This is actually sort-of fixed in Brave core, except it prompts you to download the PDF after you authenticate. However if you try to access the PDF again once you've authenticated, then it displays the PDF in PDFJS.

@tpeacock19
Copy link

I think this may have been the wrong issue to identify; however I'm experiencing the following:

I have a kanboard instance here https://kb.treypeacock.com which you can login with u:test p:testpass

If you access the only shared project
01-brave-pdf-issue
select the task
02-brave-pdf-issue
attempt to view the pdf you are thrown the following error:
03-brave-pdf-issue
04-brave-pdf-issue

I get the same error when I need to login to my university's Active Directory and attempt to view a pdf.

@mwdiers
Copy link

mwdiers commented Oct 23, 2018

Thank you for bringing this forward again. This is is the one issue that is preventing me from switching entirely to Brave, as I cannot view any reports in our ERP system without downloading them first (which is a pain in the rear when I am trying to pound through PO approvals for IT).

@diracdeltas
Copy link
Member

@tpeacock19 that is a separate PDFJS issue (this one only applies to PDFs which are behind HTTP basic auth)

@diracdeltas
Copy link
Member

diracdeltas commented Oct 24, 2018

confirmed that it works on Chrome with PDFJS extension

@tpeacock19
Copy link

@diracdeltas is there currently an open issue for this or should I make one?

@rebron rebron added the priority/P3 The next thing for us to work on. It'll ride the trains. label Oct 26, 2018
@rebron rebron modified the milestones: 1.x Backlog, 0.57.x - Dev Oct 26, 2018
@cndouglas
Copy link
Contributor

@tpeacock19 See #1287

@rebron rebron removed this from the 0.57.x - Dev milestone Oct 30, 2018
@bbondy bbondy modified the milestones: 1.x Backlog, 0.57.x - Dev Oct 30, 2018
@bbondy bbondy modified the milestones: 0.57.x - Dev, 1.x Backlog Oct 30, 2018
@diracdeltas
Copy link
Member

actually i was mistaken, the basic auth issue is not fixed in Chrome either. what happens in Chrome is that it loads in pdfium (which i mistook for pdfjs). Brave disables pdfium so instead it tries to download the pdf.

@bbondy
Copy link
Member

bbondy commented Nov 1, 2018

@tpeacock19 the one you ran into is not related to basic auth and is fixed here:
#1287
It'll be included in 0.57.x but I'll see if we can get it in 0.56.x which is about a week away.

@btlechowski
Copy link

btlechowski commented Dec 12, 2018

Verification passed on

Brave 0.58.11 Chromium: 71.0.3578.80 (Official Build) beta (64-bit)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Windows 7 x64

Used STR from OP.

Verification passed on

Brave 0.58.12 Chromium: 71.0.3578.80 (Official Build) (64-bit)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Linux

Verified passed with

Brave 0.58.12 Chromium: 71.0.3578.80 (Official Build) (64-bit)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Mac OS X
  • Verified steps from description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment