Skip to content

fix: enforce envelope ownership when adding files - #8309

Open
vitormattos wants to merge 8 commits into
mainfrom
security/envelope-owner-authorization
Open

fix: enforce envelope ownership when adding files#8309
vitormattos wants to merge 8 commits into
mainfrom
security/envelope-owner-authorization

Conversation

@vitormattos

@vitormattos vitormattos commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

Enforces object ownership before adding files to an existing envelope.

RequireManager only requires an authenticated manager/requester context and does not authorize access to a specific LibreSign file. The add-file endpoint now applies the existing file ownership predicate immediately after resolving the envelope and before upload processing.

Regression coverage

  • PHPUnit API coverage in tests/php/Api/Controller/FileControllerTest.php validates the cross-owner rejection through the existing ByJG/OpenAPI contract test infrastructure.
  • Behat regression verifies that a user who is allowed to request signatures still cannot modify another requester's draft envelope by UUID.
  • Behat baseline verifies that the envelope owner still reaches normal upload validation.

Security

Related to the private security advisory for cross-owner envelope document injection.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos changed the title test: cover envelope ownership authorization fix: enforce envelope ownership when adding files Sep 9, 2026
@vitormattos
vitormattos force-pushed the security/envelope-owner-authorization branch 2 times, most recently from 953ccf7 to d2fb25f Compare September 9, 2026 00:56
@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable35

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable34

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable33

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable32

@vitormattos vitormattos added this to the Next Major (36) milestone Sep 9, 2026
@vitormattos vitormattos self-assigned this Sep 9, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos force-pushed the security/envelope-owner-authorization branch from c33e50b to c1f1091 Compare September 9, 2026 01:09
@vitormattos
vitormattos marked this pull request as ready for review September 9, 2026 01:10
@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable35

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable34

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable33

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 0. Backlog

Development

Successfully merging this pull request may close these issues.

1 participant