Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 467166

Summary: [sites] mapping to an invalid file URL returns a 404 with a project with unwise characters in the name
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: ServerAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 9.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Anthony Hunter CLA 2015-05-12 21:44:02 EDT
In some cases, when a project name includes spaces and the "unwise character" bar ("|"), the URL Path including " |" is double encoded as %2520%257C rather than %20%7C. When the mapped URL is dispatched to the file servlet it returns a 404 and self hosting breaks.
Comment 2 Anthony Hunter CLA 2015-05-13 15:50:55 EDT
There is a problem that some Orion APIs are intentionally double encoded,

Like the URL http://127.0.0.2:8080/code/gitapi/commit/refs%252Fremotes%252Forigin%252Fmaster/file/ahunter-OrionContent/anthonyh%20%7C%20orion%20client/?page=1&pageSize=20&mergeBase=true

The part of the URL refs%252Fremotes%252Forigin%252Fmaster is intentionally double encoded!

I added an additional check (hack) that if the %2520 string occurs then do the URLDecoder.decode() as required by the internal server.

This is commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=ffedd4c7162d0d953f0772054aa62d6f39e1aa83