Skip to content

[Bug]: file origin does not match viewer's Error Message when accessing PDF documents via Clientless VPN solutions #20383

@tobias-kamleiter

Description

@tobias-kamleiter

Attach (recommended) or Link to PDF file

When using a "clientless VPN solution", we are experiencing a severe issue when trying to open PDFs from the server using PDF.js in several applications.
Issue occurs with any PDF file that shall be opened via web applications accessed using the "clientless VPN" solution (e.g. Palo Alto Global Protect).

Any access request to server side PDF file yields the following Error:
An error occured while loading the PDF.
Message: file origin does not macht viewer's

Image

Note: by the nature of clientless vpn solutions, the "VPN server URL" is always added in front of the actual target server URL which then in turn tries to open / render the requested PDF via the "internal" file= command. Exemple URL composition:
https://vpn.clientless-server.url/https-5081/target.server.URL/folder/viewer.html?file=https://target.server.url/folder/requested_file.pdf
Explanation:

Expectation:
PDF.js should consider such clientless VPN solutions and accept PDFs for rendering/display if file origin is a modified version of viewer origin.

As the clientless server URL may change / be different for multiple customers and/or applications we cannot add execptions on a case by case basis in the PDF.js code.

Web browser and its version

EDGE 140.0.3485.94 and others

Operating system and its version

WIN11, 24H2

PDF.js version

v2.10.377;

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. sign in to clientless VPN server portal, open local web server (behind VPN tunnel) via clientless server portal page
  2. request/open pdf file location on local server using the full URL including the clientless server url portion

What is the expected behavior?

Expected behaviour: file is loaded / displayed same way as if local server is accessed via Intranet / client-based VPN connection

What went wrong?

Error Message:

Image

File is not loaded / rendered

Link to a viewer

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions