Repository navigation
fix(openapi): document optional sign request UUID headers - #9466
Merged
Merged
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Contributor
Code Metrics ReportNote: Metrics describe the revision analyzed by the successful PHPUnit run. Newer commits with pending, canceled or failed checks may not yet be represented in this report.
Details | | main (2c798a0) | #9466 (9a5b13e) | +/- |
|---------------------|----------------|-----------------|------|
| Coverage | 76.4% | 76.4% | 0.0% |
| Files | 512 | 512 | 0 |
| Lines | 28845 | 28845 | 0 |
| Covered | 22063 | 22063 | 0 |
+ | Test Execution Time | 3m41s | 3m14s | -27s |Code coverage of files in pull request scope (55.4% → 55.4%)
Reported by octocov |
Member
Author
|
/backport to stable35 |
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
vitormattos
marked this pull request as ready for review
November 13, 2026 17:27
lfals
reviewed
Nov 13, 2026
lfals
left a comment
There was a problem hiding this comment.
The six public operations that already accept libresign-sign-request-uuid and skip it for a logged-in caller now declare that header as optional. Generated OpenAPI and TypeScript types match those attributes.
One regression: OpenApiRequestHeadersTest requires sign_file-request-code-by-file-id to stay undocumented, so a client that follows the spec is rejected with Invalid UUID before requestCodeByFileId runs.
lfals
requested changes
Nov 13, 2026
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>
This was referenced Nov 14, 2026
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.
Summary
libresign-sign-request-uuidheader for all middleware-consumer OCS operations that lack a{uuid}route parameter: six previously missing operations inSignatureElementsControllerandIdDocsController, plusSignFileController::requestCodeByFileId.openapi.json,openapi-full.json, and their TypeScript types. The default and full specs now document the header on 10 operations; the administration spec remains unchanged.#[RequestHeader]declarations into the expected results.ModalVerificationCode.requestCode()to use the current signer's/approver's resolved UUID andsignStore.buildRequestCodeUrl(), even when afileIdis present. The oldfile_id/{fileId}/codecall supplied no UUID, but#[RequireSigner]needs it before the controller runs. Preserve theidDocApproval=truecontext and avoid making any request when no valid UUID context can be resolved.fileIdwithout usable UUID. Preserve the existing check that a typed email address is not sent as a verification-code destination.Review findings and contract decisions
sign_file-request-code-by-file-id: confirmed and corrected. The controller now documents the header; the application UI no longer takes that route without a UUID.signature_elements-use-saved-signature-elements: intentional. The external signer's UUID is required for authorization, but the header itself is not the only accepted source:InjectionMiddleware::getUuidFromRequest()usesIRequest::getParam('uuid', $request->getHeader(...)), and Nextcloud merges route, GET and POST parameters. Keepingrequired: falseon the header avoids rejecting/documenting incorrectly an otherwise valid request with auuidrequest parameter. A request missing both sources is rejected; authenticated users do not become eligible to reuse external email signatures.Verification
composer openapi, TypeScript generation,npm run ts:check, PHP syntax and PHP-CS-Fixer were also checked on the earlier revision.66863d3andf8baf71. GitHub CI for the current HEAD is the authority for their execution; do not treat prior runs as current results.Boundaries / outstanding verification
x-prefix; renaming it would break existing clients and is outside this change.