Skip to content

fix: prevent signers from seeing files with DRAFT sign_request status#6139

Merged
vitormattos merged 2 commits intomainfrom
fix/filter-draft-sign-requests-in-list
Dec 11, 2025
Merged

fix: prevent signers from seeing files with DRAFT sign_request status#6139
vitormattos merged 2 commits intomainfrom
fix/filter-draft-sign-requests-in-list

Conversation

@vitormattos
Copy link
Copy Markdown
Member

No description provided.

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]>
@vitormattos vitormattos added this to the Next Major (33) milestone Dec 11, 2025
@vitormattos vitormattos self-assigned this Dec 11, 2025
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 11, 2025
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

@vitormattos
Copy link
Copy Markdown
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]>
@vitormattos vitormattos merged commit 778067f into main Dec 11, 2025
65 checks passed
@vitormattos vitormattos deleted the fix/filter-draft-sign-requests-in-list branch December 11, 2025 21:31
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant