rishabhdaim opened a new pull request, #457:
URL: https://github.com/apache/jackrabbit-filevault/pull/457
## Summary
Backport JCRVLT-877 to `3.2.x` from the published master commit
`db708e27291f3fd3939cb583cfec0d407d1105bf`.
Remote content named `.vlt` can collide with the working copy's local
control ZIP. Reject reserved names before processing remote content, including
case variants and Windows trailing-dot/space aliases, while continuing to
process legitimate remote names.
## Changes
- Add the original `FileSystemNameValidator` utility in `vault-vlt`.
- Skip reserved remote names at `VltDirectory.applyWithRemote`, with a
user-facing message.
- Preserve the defense-in-depth rejection in `Update.run`.
- Adapt the source regression tests to JUnit 4.12, Java 7 source
compatibility, and the maintenance branch's `VltContext` constructor.
- Use a unique `TemporaryFolder` with explicit directory and output-stream
cleanup.
- Add the existing managed `jackrabbit-spi-commons` dependency in test scope
for the real working-copy fixture; no production dependency or exported
package-version changes.
- Retain the existing JUnit dependency rather than adding the source
branch's Vintage engine.
## Test plan
- [x] Compile the five-module vault-vlt dependency reactor using Java 8.
- [x] Run all 13 selected vault-vlt tests: eight validator/attack tests and
five existing metadata tests; zero failures, errors, or skips.
- [x] Run attack tests against isolated original `3.2.x` production classes:
all four attack regressions fail as expected, while the two controls pass.
- [x] Check patch whitespace.
- Spotless could not run because this branch does not configure the plugin.
Command:
```text
mvn -B -ntp -pl vault-vlt -am \
-Dtest=FileSystemNameValidatorTest,ReservedRemoteNameAttackTest,TextXMLEntries \
-Dsurefire.failIfNoSpecifiedTests=false test
```
## Links
- Jira: https://issues.apache.org/jira/browse/JCRVLT-877
- Source:
https://github.com/apache/jackrabbit-filevault/commit/db708e27291f3fd3939cb583cfec0d407d1105bf
- Earlier master-targeted PR: #456 (closed; this PR targets `3.2.x`).
Co-Authored-By: GitHub Copilot <[email protected]>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]