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

Bug 478227

Summary: IOUtilities.getQueryParameter() returns the wrong parameter
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ServerAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 10.0   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Test class showing the problem none

Description Mark Macdonald CLA 2015-09-23 14:41:01 EDT
Created attachment 256802 [details]
Test class showing the problem

The helper getQueryParameter() in org.eclipse.orion.server.core/src/org/eclipse/orion/server/core/IOUtilities.java contains a bug.

If the caller requests query parameter "X" and an earlier param "Xy=..." appears in the query string before "X=", then Xy's value is returned instead of X's value

Sample code attached
Comment 1 Mark Macdonald CLA 2015-10-01 18:24:13 EDT
Fixed, and added tests
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=87c6827