Skip to content

fix: restore FolderService userId in throwIfFileNotFound finally block#7538

Merged
vitormattos merged 9 commits intomainfrom
fix/7494-invalid-node-external-id-docs
Apr 22, 2026
Merged

fix: restore FolderService userId in throwIfFileNotFound finally block#7538
vitormattos merged 9 commits intomainfrom
fix/7494-invalid-node-external-id-docs

Conversation

@vitormattos
Copy link
Copy Markdown
Member

Issue

Fixes #7494 - Invalid node external ID causing file validation failures

Changes

  • FolderService state management: Added finally block in throwIfFileNotFound to guarantee userId restoration after temporary override for cross-storage file validation
  • Integration tests: Consolidated email signer scenarios and added file-deletion edge case coverage
  • Unit tests: Added coverage for nodeId validation and userId restoration in finally block (EmailTest)
  • DB test naming: Aligned FileMapperTest naming to match lib/Db convention

Test Coverage

  • ✅ Integration: validate.feature (13 scenarios, 113 steps)
  • ✅ Unit: EmailTest (17 tests, 22 assertions)
  • ✅ Unit: FileMapperTest (2 tests, 2 assertions)

Impact

  • Fixes file validation failures when files are owned by different storage users
  • Improves test maintainability through scenario consolidation (20% E2E time savings)
  • Ensures proper resource cleanup with guaranteed state restoration

@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Apr 22, 2026
- add FolderSettings.path typing and regenerate OpenAPI artifacts

- return controlled 404 when nodeId is invalid or source file was deleted

- generalize WebDAV Behat step and streamline validate scenarios

- add unit tests for throwIfFileNotFound behavior and userId restoration

Signed-off-by: Vitor Mattos <[email protected]>
@vitormattos vitormattos force-pushed the fix/7494-invalid-node-external-id-docs branch from 9e6ef1c to edb7291 Compare April 22, 2026 18:11
- Apply PHP CS Fixer rules to AbstractIdentifyMethod and EmailTest
- Regenerate OpenAPI artifacts

Signed-off-by: Vitor Mattos <[email protected]>
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable33

@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

@vitormattos vitormattos force-pushed the fix/7494-invalid-node-external-id-docs branch from b6686bf to c010d1d Compare April 22, 2026 19:58
@vitormattos vitormattos merged commit 9d72fac into main Apr 22, 2026
77 checks passed
@vitormattos vitormattos deleted the fix/7494-invalid-node-external-id-docs branch April 22, 2026 20:17
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

[NC 33] OCP\Files\NotFoundException "Invalid node" on identity files uploaded by external signers

1 participant