libresign/lib
Vitor Mattos ca7339e078
fix: prevent signers from seeing files with DRAFT sign_request status
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 <1079143+vitormattos@users.noreply.github.com>
2025-12-11 17:04:58 -03:00
..
Activity fix: psalm issues about override 2025-10-07 18:23:41 -03:00
AppInfo fix: psalm issues about override 2025-10-07 18:23:41 -03:00
BackgroundJob feat(crl): revoke certificates when user account is deleted 2025-11-27 16:00:48 -03:00
Collaboration/Collaborators fix: psalm issues about override 2025-10-07 18:23:41 -03:00
Command fix: use enum 2025-11-27 16:42:23 -03:00
Controller refactor: move SignatureFlow enum to dedicated Enum directory 2025-12-11 11:45:53 -03:00
DataObjects chore: make possible to don't have an image as signature 2025-04-11 10:42:55 -03:00
Dav refactor(dav): add libresign- prefix to DAV property names 2025-12-03 01:01:31 -03:00
Db fix: prevent signers from seeing files with DRAFT sign_request status 2025-12-11 17:04:58 -03:00
Enum feat: add getLabel method to SignRequestStatus enum 2025-12-11 14:28:17 -03:00
Events chore: cover with tests and improve make class to be testable 2025-08-02 20:03:06 -03:00
Exception fix: psalm issues about override 2025-10-07 18:23:41 -03:00
Files refactor: move SignatureFlow enum to dedicated Enum directory 2025-12-11 11:45:53 -03:00
Handler Merge pull request #6128 from LibreSign/fix/prevent-error-when-folder-doesnt-exists 2025-12-11 16:25:48 -03:00
Helper refactor: move SignRequestStatus enum to dedicated Enum directory 2025-12-11 11:42:11 -03:00
Listener fix: check activity settings only when user account exists 2025-12-11 15:05:56 -03:00
Middleware fix: psalm issues about override 2025-10-07 18:23:41 -03:00
Migration Merge pull request #6127 from LibreSign/fix/migration-ou-type-error 2025-12-11 16:19:03 -03:00
Notification fix: prevent warning when send notifications 2025-10-21 11:54:19 -03:00
Service fix: respect status 0 (DRAFT) when adding new signers 2025-12-11 15:14:34 -03:00
Settings refactor: move SignatureFlow enum to dedicated Enum directory 2025-12-11 11:45:53 -03:00
Capabilities.php fix: psalm issues about override 2025-10-07 18:23:41 -03:00
ResponseDefinitions.php feat: add status and statusText to LibresignSigner type 2025-12-11 14:34:26 -03:00