fix: prevent signers from seeing files with DRAFT sign_request status#6139
Merged
vitormattos merged 2 commits intomainfrom Dec 11, 2025
Merged
fix: prevent signers from seeing files with DRAFT sign_request status#6139vitormattos merged 2 commits intomainfrom
vitormattos merged 2 commits intomainfrom
Conversation
Filter out sign_requests with status DRAFT (0) in the file list endpoint when the user is not the file owner. This ensures that signers do not see documents where their sign_request is in DRAFT status, unless they are the requester (owner) of the document. The filter is applied in the getFilesAssociatedFilesWithMeQueryBuilder method by adding conditions to exclude: - Files with status DRAFT (0) - Sign requests with status DRAFT (0) Only when the user is not the file owner (not matching f.user_id). This change affects only the /api/v1/file/list endpoint and does not impact other file access methods or signature flows. Ref: Security improvement to prevent premature document visibility Signed-off-by: Vitor Mattos <[email protected]>
Member
Author
|
/backport to stable32 |
Member
Author
|
/backport to stable31 |
Split the sequential signing test into two separate scenarios to better validate the DRAFT status filtering behavior: 1. First scenario: Tests that signer1 can see and sign the document (simpler flow without multiple user switches) 2. Second scenario: Tests that signer2 does NOT see the document when their sign_request is in DRAFT status This avoids multiple user context switches in the same scenario which was causing authentication issues in the Behat tests, and better isolates the behavior we want to validate. Signed-off-by: Vitor Mattos <[email protected]>
This was referenced Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.