You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/10/18 13:20:13 UTC
[PR] normalize jar entry paths with URI.normalize in StscImporter.resolve [poi-xmlbeans]
pjfanning opened a new pull request, #139:
URL: https://github.com/apache/poi-xmlbeans/pull/139
Follow-up to #138.
`StscImporter.resolve` removed `/..` segments after `!/` by hand. Replace that loop with `URI.normalize()` on the jar entry path:
- `./` segments are now resolved (`./common/./b.xsd` → `!/xsd/common/b.xsd`).
- Names that merely start with `..` (`..b.xsd`, `.../b.xsd`) are no longer treated as parent references.
- `..` segments that climb above the jar root are still left in place (`../../b.xsd` → `!/../b.xsd`), matching #138, so the lookup fails with a normal compile error instead of resolving to another entry.
- Query/fragment on the child are preserved.
Tests:
- use `jar:file:/nonexistent/schemas.jar!` so the compile test can't be affected by a real file
- assert the unresolved result for the above-root case, not just termination
- add cases for `./`, `..`-prefixed names and fragments
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: dev-unsubscribe@poi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [PR] normalize jar entry paths with URI.normalize in StscImporter.resolve [poi-xmlbeans]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #139:
URL: https://github.com/apache/poi-xmlbeans/pull/139
--
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: dev-unsubscribe@poi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org