Blob url opens Adobe Reader in FF but not in PM

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Scratchy123

Blob url opens Adobe Reader in FF but not in PM

Unread post by Scratchy123 » 2017-06-14, 13:56

Hi,

on a secured website, on my personal account, there is a link to view a PDF in the browser.
The (weird) url is blob:https://wwwd.caf.fr/da02d796-b1ba-48c8- ... c727de98d6

The html body is :

Code: Select all

<head><meta content="width=device-width; height=device-height;" name="viewport"></head><body marginheight="0" marginwidth="0"><embed type="application/pdf" src="blob:https://wwwd.caf.fr/da02d796-b1ba-48c8-b4d7-e6c727de98d6" name="plugin" height="100%" width="100%"></body>
On firefox 45, it takes several seconds, displays a message like "if you cannot see directly the pdf, click here", and then it opens and load the pdf within Adobe Reader plugin inside the browser.

In PM nothing happens actually. I even had to load the inspector in order to see html body. It doesn't even try to load the pdf, so it doesn't seem to have something special about the file (still, I added it in attachment)

I'm running PM 27.3.0 32 bits on Ubuntu 16.04 LTS with Adobe Read 9.5 (latest Linux release) plugin enabled.
PDF
Attachments
Changement de situation.pdf
(138.55 KiB) Downloaded 29 times

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35600
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Blob url opens Adobe Reader in FF but not in PM

Unread post by Moonchild » 2017-06-14, 18:06

blob: scheme URIs can only be generated by the browser. If it is served by the server this way, then it is incorrect usage.
See also https://developer.mozilla.org/en-US/doc ... eObjectURL
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Scratchy123

Re: Blob url opens Adobe Reader in FF but not in PM

Unread post by Scratchy123 » 2017-06-14, 19:33

The url didn't come as a direct link, instead, the original source code that led me there was this one, seems to use Angular js:

Code: Select all

<button title="(fichier PDF d'environ 250Ko)" type="button" class="btn btn-form-cnaf btn-pdf-cnaf btn-active-cnaf" cnaf-stats-xiti-click="" clickname="AF_formulaire" tag-action="download" cnaf-telechargement-pdf="" pdf-promise="prestationsEnfantsVm.pdfPromise('DPF')" on-success="prestationsEnfantsVm.pdfOnSuccess('DPF', data)" on-error="prestationsEnfantsVm.pdfOnError('DPF', error)">Télécharger la demande</button>
In fact, it seems to do a get on an https url like this : GET XHR https://wwwd.caf.fr/api/demandeprestati ... tion=RADIE [HTTP/1.1 200 OK 2736 ms]

the address bar gets a about:blanck, and content page is "Loading in progress"

X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
X-Application-Context: demandeprestationfront:dev,productiondmz:10009
Via: Gateway
Server: Gateway
Pragma: no-cache
Expires: 0
Date: Wed, 14 Jun 2017 19:26:15 GMT
Content-Type: application/pdf;charset=UTF-8
Connection: close
Cache-Control: no-cache, no-store, max-age=0, must-revalidate

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35600
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Blob url opens Adobe Reader in FF but not in PM

Unread post by Moonchild » 2017-06-17, 12:59

Assuming they use the blob: correctly, it depends entirely on what JS mangling they use to actually pull the PDF from memory.
I swear, it's kind of silly how some sites want to deal with documents.

The unstable channel of Pale Moon has a change in place to offer .origin on blobs, so if that's the problem for their script, it should be solved in unstable. Otherwise, it's anyone's guess.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked