[ 
https://issues.apache.org/jira/browse/SOLR-16476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623896#comment-17623896
 ] 

Kevin Risden commented on SOLR-16476:
-------------------------------------

SOLR-4311 originally added the version escaping which just happened to follow 
the previous adminPath/contextPath. 
https://github.com/apache/solr/commit/5b6b0776ef109c8dd09f2437700bd4460e274c84

I checked the escaping rules and the version string rules - there is no need to 
escape the version string at all.

> Don't need commons-text dependency in solr-core
> -----------------------------------------------
>
>                 Key: SOLR-16476
>                 URL: https://issues.apache.org/jira/browse/SOLR-16476
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>            Assignee: Kevin Risden
>            Priority: Minor
>              Labels: newdev
>
> I don't think we +really+ need commons-text in solr-core.  I see it's for 
> only one usage:
> https://github.com/apache/solr/blob/c99af207c761ec34812ef1cc3054eb2804b7448b/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java#L83
> {noformat}
> String[] search = new String[] {"${contextPath}", "${adminPath}", 
> "${version}"};
>         String[] replace =
>             new String[] {
>               StringEscapeUtils.escapeEcmaScript(request.getContextPath()),
>               
> StringEscapeUtils.escapeEcmaScript(CommonParams.CORES_HANDLER_PATH),
>               
> StringEscapeUtils.escapeEcmaScript(pack.getSpecificationVersion())
>             };
> {noformat}
> But contextPath & adminPath are no longer in our admin pages.  "version" is.  
> Regardless, I don't see why we need to escape EcmaScript; these variables 
> come from internal/validated sources that will not have user provided data 
> that could hack the pages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to