Skip to content

[Bug]: PDFs do not load with secure view enabled #5048

@Vito0912

Description

@Vito0912

Describe the bug
When secure view is enabled with tagging restrictions, any PDFs assigned with the tag become completely inaccessible. The OnlyOffice editor does not even try to open

Edit: It does not work when clicking on it directly. When I open it with Office, it works correctly. Sadly, this is not a solution, because shares with a download option still have this issue. If I remove download from the share, it opens in Office and works. As soon as I add download permission, it tries to open in the normal PDF viewer and fails again.

To Reproduce
Steps to reproduce the behavior:

  1. Enable secure view
Image
  1. Try to open an PDF file

Expected behavior
Either the PDF opens normally (or better, I am not sure if PDFs are supported) show the PDF as secure view

Screenshots
If applicable, add screenshots to help explain your problem.

Client details:

  • OS: Windows
  • Browser Firefox
  • Version 144.0b5
  • Device: Desktop

Server details

Operating system: Linux on Docker. AIO managed

Web server: /

Database: /

PHP version: /

Nextcloud version: 31.0.9

Version of the richdocuments app 8.7.5

Version of Collabora Online 25.04.5.2

Configuration of the richdocuments app

"apps": {
        "richdocuments": {
            "installed_version": "8.7.5",
            "enabled": "yes",
            "types": "filesystem,prevent_group_restriction",
            "canonical_webroot": "",
            "public_wopi_url": "https://<domain>",
            "external_apps": "",
            "wopi_allowlist": "<>",
            "wopi_callback_url": "http:\/\/nextcloud-aio-apache:<port>",
            "wopi_url": "http:\/\/nextcloud-aio-apache:<port>",
            "disable_certificate_verification": ""
        }
    }

Logs

Nextcloud log (data/nextcloud.log)

None for this

Browser log

Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

XHRGET
https://<file path>
[HTTP/2 403  144ms]

Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions