Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-1434

Bad characters in file name can cause Solr 500 errors

    XMLWordPrintableJSON

    Details

      Description

      There are reports that quotes or spaces in a file name can blow up the Solr indexing of the document and cause it to throw a 500 error.

      The code in question (from ModifiedHttpSolrClient) is the following:

                  String name = content.getName();
                  if (name == null) {
                    name = "";
                  }
                  parts.add(new FormBodyPart(name,
                      new InputStreamBody(
                          content.getStream(),
                          contentType,
                          content.getName())));
      

      ... where content.getName() would be returning a name with illegal characters. The question is, what does httpclient do with this name, and should it be escaping it in some way?

        Attachments

        1. CONNECTORS-1434.patch
          1 kB
          Karl Wright

          Activity

            People

            • Assignee:
              kwright@metacarta.com Karl Wright
              Reporter:
              kwright@metacarta.com Karl Wright
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: