[ 
https://issues.apache.org/jira/browse/SOLR-4265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe Schindler updated SOLR-4265:
--------------------------------

    Attachment: SOLR-4265.patch

Here the final patch with some improvements, security fixes and refactoring:
- The parser for POSTed application/x-www-form-urlencoded is now a separate 
SolrRequestParser. This makes code more clean. StnadrdRequestParser just 
delegates
- The POST form data now is also limited in size as given in SolrConfig (like 
multipart messages). Defaults to 2 MB. This was also done previously in Jetty, 
but not configureable through solrconfig. Now its at one place and consistent 
between all servlet containers.
- when posting form data but also give parameters in URL, the URL form contents 
appear *before* the POST form data. This is also how it is done in 
Jetty/Tomcat. This only affects duplicate parameters. Also I fixed the previous 
code to use UTF-8 always for the URL form data, but for the POSTed one the 
content-type is visited.
- Some cleanups in the other Solr servlets, also reenable POST is the 
ZookeeperInfoServlet (it now uses SolrRequestParsers - so all servlets are 
consistent in how they get input parameters)

I want to commit this later this evening. I hope all is fine. If you have some 
time, you can check it.

It might be good to backport this to 3.6.3 (if it comes out), as this is a 
serious issue for many people using Tomcat instead of Jetty and that don't read 
the Solr Wiki how to correctly configure their container.
                
> Fix decoding of GET/POST parameters for servlet containers with non-UTF-8 URL 
> parsing (Tomcat)
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4265
>                 URL: https://issues.apache.org/jira/browse/SOLR-4265
>             Project: Solr
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 4.0
>         Environment: Windows but, environment independent
>            Reporter: Alex Rocher
>            Assignee: Uwe Schindler
>         Attachments: CropperCapture[4].png, CropperCapture[5].png, 
> CropperCapture[6].png, SOLR-4265.patch, SOLR-4265.patch, SOLR-4265.patch, 
> SolrDispatchFilter.java.patch
>
>
> When you type an accent (in french language for example) in the console query 
> tester, there's no charset conversion (servlet request charset conversion)
> Eg.: "même" is converted into it's ISO-8859-1 representation ==> fail
> The reason : getCharacterEncoding from HTTPRequest is not tested. Il it's 
> null, il will assume to convert an UTF-8 encoding charset.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to