Skip to content

[stable33] fix: store identification documents of external signers under the file owner - #8370

Merged
vitormattos merged 2 commits into
stable33from
backport/8368/stable33
Sep 12, 2026
Merged

[stable33] fix: store identification documents of external signers under the file owner#8370
vitormattos merged 2 commits into
stable33from
backport/8368/stable33

Conversation

@backportbot-libresign

Copy link
Copy Markdown

Backport of PR #8368

…e owner

When an unauthenticated signer uploads an identification document,
IdDocsService::addFilesToDocumentFolder() called saveFile() without a
userManager. FolderService then had no user id, so the node was written
to the unauthenticated appdata folder, while the File row received the
owner of the signed file as user_id — the value getPdfByUuid() later
uses to look the node up. The document was intact on disk but unreachable
from the validation UI (empty viewer, 404 on download).

Resolve the owner of the signed file with the same lookup saveFile()
already uses for user_id and pass it as userManager, mirroring
addIdDocs(). Uploads for a sign request whose owner cannot be resolved
keep the current behaviour.

Resolves: #8364

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: André Maia <andrefnkmm@gmail.com>
…cs storage

getOwnerOfSignedFile() caught \Throwable, which turned unexpected
database or programming errors into the unauthenticated appdata fallback
— the same inconsistent state this change is fixing. Catch only the
DoesNotExistException documented by FileMapper::getById() and let other
failures surface.

Add one test for the missing row (falls back, no userManager) and one
asserting that an unexpected exception is propagated before saveFile()
is reached.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: André Maia <andrefnkmm@gmail.com>
@github-project-automation github-project-automation Bot moved this from 0. Backlog to 1. to do in Roadmap Sep 12, 2026
@vitormattos
vitormattos merged commit 9f64017 into stable33 Sep 12, 2026
65 checks passed
@vitormattos
vitormattos deleted the backport/8368/stable33 branch September 12, 2026 20:14
@github-project-automation github-project-automation Bot moved this from 1. to do to 4. to release in Roadmap Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

2 participants