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

Bug 392217

Summary: Search can't handle equals and other reserved characters
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ServerAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: 2.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2012-10-17 15:18:47 EDT
1. Log into Orion
2. Focus the search box and paste in this query, then press Enter.
<img src="http://i.imgur.com/3dLMJ.jpg" alt="Mark Macdonald" title="Mark Macdonald"> 
3. The server returns an Error 500

The java stack trace is 
> java.lang.NullPointerException: null
> 	at org.eclipse.orion.internal.server.search.SearchServlet.buildSolrQuery(SearchServlet.java:63) ~[na:na]
> 	at org.eclipse.orion.internal.server.search.SearchServlet.doGet(SearchServlet.java:48) ~[na:na]
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) ~[javax.servlet_3.0.0.v201112011016.jar:na]
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na]
Comment 1 John Arthorne CLA 2012-10-31 15:39:54 EDT
In your case it was the equals ('=') character that was messing things up. Our parsing on the server side was using equals as a key/value separator for query parameters, but it should only have split on the first equals char. While adding regression tests I also noticed we were not correctly handling several other special characters: @#$%^&  - this fix addresses all of these, and adds regression tests for all of them:

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=b11e9bde55bc8884612691fa8d8936c216cdabea