Skip to content

[Bug]: Incompatibility between /security/add-password (blank password) and /security/cert-sign leading to corrupted PDF #6317

@antonsamper

Description

@antonsamper

Installation Method

Local Installation

The Problem

This appears to be very similar to #3494, but I want to confirm whether this is expected behaviour or a bug.

Steps to reproduce

  1. Apply permissions to a PDF using:
POST /api/v1/security/add-password

with an empty/blank password.

  1. Then attempt to sign the same file using:
POST /api/v1/security/cert-sign

Expected behaviour

The PDF should remain valid and be successfully signed with the certificate and should also have permissions.

Actual behaviour

The resulting PDF becomes corrupted and cannot be opened properly after signing in Adobe Acrobat.

Question

Is it supported to:

  • apply permissions with a blank password, and then
  • sign the document with /security/cert-sign?

Or is there a different workflow/actions that could be triggered to achieve this?

Additional context

This seems closely related to #3494, but the specific case here involves an empty password rather than a non-empty one.

Version of Stirling-PDF

2.10.0

Last Working Version of Stirling-PDF

No response

Page Where the Problem Occurred

No response

Docker Configuration

Relevant Log Output

Additional Information

No response

Browsers Affected

No response

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Back EndIssues related to back-end developmentneeds investigationIssues that require further investigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions