| Summary: | cannot push new branch with name containing '/' - | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Grant Gayed <grant_gayed> |
| Component: | Git | Assignee: | Project Inbox <orion.git-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.sohn, stefan.lay |
| Version: | 4.0 | ||
| Target Milestone: | 5.0 RC1 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Grant Gayed
The git ui does encode the "/" once to %2F. This is not accepted by most servers because of security reasons [1].
Because of that branch references are encoded twice in orion:
- branch names are encoded twice on the server
Branch.toJSON
--Branch.getCommitLocation
--Branch.getName -> first encoding
--BaseToCommitConverter.getCommitLocation
--new URI -> second encoding
- branch names are decoded twice on server
GitServlet.doGet
--req.getPathInfo() first decoding
--PushJob
-- GitUtils.decode(path.segment(1)); second decoding
I'll propose a fix.
[1] https://scapsync.com/cve/CVE-2007-0450
Fix pushed to Gerrit: https://git.eclipse.org/r/21471 merged as 601bd328192895e092cf0f4d8a4fadc641b4fea5 |