Solr URI decoding of Solr arguments breaks legitimate %
softwaredoug opened this issue · 2 comments
I spent a good bit of yesterday trying to get to the bottom of why Splainer was not happy with one of my queries. Long story short, its because I had the following parameter somewhere mm=100%
.
When we parse args, in solrUrlSvc, we split on =
. We then run decodeURIComponent on the value (the 100%
here). This barfs on the % without a following number.
For a while I thought, why is this decodeURIComponent here, but it makes sense. If you wanted to search for = or &, the only way you could do it without confusing the parser of the Solr args would be to pass it as a URI component like q=text:%3D
. This query would be the only way to run a search for an equals sign in the text field. Almost all legitimate non URI encoded strings can be decoded and have nothing happen to them.
However, oddly Quepid works fine with mm=100%. Moreover, it also turns q=text:%3D
into text:=
. Perhaps Quepid doesn't use this splainer-search functionality?
Confirmed, Quepid parses this on the Rails side
Playing around with this idea to avoid URI decoding very obviously not URI decoded strings