Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16476

Remove commons-text dependency from solr-core

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • main (10.0), 9.2
    • Admin UI, Build

    Description

      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

      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())
                  };
      

      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.

      Attachments

        Issue Links

          Activity

            People

              krisden Kevin Risden
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m