Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Opening PDF via Wayback Machine archive.org loads different URL #6726

Closed
luixxiul opened this issue Jan 19, 2017 · 3 comments
Closed

Opening PDF via Wayback Machine archive.org loads different URL #6726

luixxiul opened this issue Jan 19, 2017 · 3 comments

Comments

@luixxiul
Copy link
Contributor

luixxiul commented Jan 19, 2017

Test plan

Open https://web.archive.org/web/20160106152308/http://stlab.adobe.com/wiki/images/d/d3/Test.pdf


Describe the issue you encountered:
https://community.brave.com/t/bug-wrong-url-in-address-bar-viewing-pdfs-at-archive-org-wayback-machine/785?u=suguru

Visiting https://web.archive.org/web/20160106152308/http://stlab.adobe.com/wiki/images/d/d3/Test.pdf in Brave (OSX/0.12.15) displays the PDF – but the address bar shows only the "http://stlab.adobe.com/wiki/images/d/d3/Test.pdf".

Expected behavior:
The address should not be changed or the resource should be loaded from the correct origin.

@luixxiul luixxiul added this to the Backlog milestone Jan 19, 2017
@gojomo
Copy link

gojomo commented Jan 19, 2017

I suppose I should have reported here first; other details from the forum post:

  • Seen on other PDFs from the WaybackMachine, but not yet any other URL returning HTML from there.

  • Dev Tools network tab suggests PDF is truly coming from web.archive.org (as also happens when same URL is loaded in Chrome), not the displayed URL - so this doesn't seem to be a case of some surprise redirect back to the address-bar displayed URL.

As a situation where the address bar shows incorrect info, there may be phishing/security considerations, if there turn out to be other ways to trigger the mistaken display.

@luixxiul
Copy link
Contributor Author

@gojomo thanks for your info!

@diracdeltas
Copy link
Member

nice catch! should be an easy regex fix in https://github.com/brave/browser-laptop/blob/master/js/lib/urlutil.js#L298. if any first-time contributors want to take this, please go ahead.

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