Repository navigation
fix(api): detect multipart file uploads and reject truncated batches (#9435) - #9452
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>
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>
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 (e961fd1) | #9452 (9690201) | +/- |
|---------------------|----------------|-----------------|-------|
+ | Coverage | 76.1% | 76.2% | +0.0% |
| Files | 500 | 500 | 0 |
| Lines | 28578 | 28589 | +11 |
+ | Covered | 21776 | 21785 | +9 |
+ | Test Execution Time | 3m41s | 2m56s | -45s |Code coverage of files in pull request scope (25.0% → 26.9%, patch 84.6%)
Reported by octocov |
Member
Author
|
/backport to stable35 |
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos
marked this pull request as ready for review
November 13, 2026 16:20
This was referenced Nov 14, 2026
Merged
Merged
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.
Scope
Partial LibreSign-side fix for #9435. This is not a replacement for nextcloud/openapi-extractor#401 and does not claim complete multipart OpenAPI generation.
getUploadedFile('files')/getUploadedFile('file')intoFileController::save(), preserving the existing JSON/reference fallback and routing behavior. The upstream extractor's proposed direct-call detection can now see these accesses.expectedFilesCountmultipart field check infile-saveandfile-add-file-to-envelope, executed after validation/normalization but before storage. A mismatch (e.g., a PHPmax_file_uploadstruncation) produces the existing 422 error response; omitted values remain accepted for existing clients.fileandfiles[]field names remain unchanged.Compatibility and security
anyOfNo-Go.Verification
e966f6692965917d8907bf7cb071ec5ddc1c6fa8after fixing two CI regressions: (a) syncing four generated artifacts from the exactcomposer run openapiCI diff, and (b) providing the missing envelope capability fixture in the new Vitest test.files[]multiplicity limitation. Do not mark Document multipart uploads in the OpenAPI contract #9435 complete on this basis.Before marking ready for review
composer test:unit -- --filter FileControllerUploadCountTestnpx vitest run src/tests/components/Request/RequestPicker.spec.ts src/tests/components/RightSidebar/EnvelopeFilesList.spec.tsnpm run ts:check,npm run lint,vendor/bin/phpunit -c tests/php/openapi/phpunit.xmlCloses no issue: #9435 remains blocked on upstream multipart extraction/SDK serialization and runtime evidence.