Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-12771

Groups names with line feeds ('\n') cause JSON errors for SOLR and other remote calls

    Details

    • Resource:
      External

      Description

      Using LDAP group sync, create group names with line feeds '\n' in the name.

      Index tracking fails because JSON encoding does not handle the line feed.

      SEVERE: Tracking failed
      org.json.JSONException: Unterminated string at character 1306290
      at org.json.JSONTokener.syntaxError(JSONTokener.java:413)
      ...
      at org.alfresco.solr.client.SOLRAPIClient.getNodesMetaData(SOLRAPIClient.java:725)

      Attempting to delete the group fails as well because the group name is not escaped:
      Exception from executeScript - redirecting to status template error: 01170003 Script url /api/groups/fihel-SQL-Reporting admins <NOTE: \n here>
      CNF:e4759fd0-2ad0-44ab-bca1-1c8e888ea2d3 does not map to a Web Script.

      Expected:
      Either disallow the line feeds, fix the JSON encoding or both

        Attachments

        1. ALF-12771.patch
          11 kB
        2. browse-groups.jpg
          browse-groups.jpg
          27 kB
        3. error.json
          1.80 MB
        4. stderr.log
          141 kB

          Issue Links

            Activity

            Transition Time In Source Status Execution Times
            Derek Hulley made transition -
            New Open
            4m 21s 1
            Andrew Hind made transition -
            Open Need Info
            1d 4h 34m 2
            Vladimir Kulev made transition -
            Need Info Open
            1h 40m 2
            Steven Glover made transition -
            Open Resolved
            9d 16h 26m 1
            Kevin Roast made transition -
            Reopened Open
            4d 1h 9m 1
            Kevin Roast made transition -
            Open Investigate
            18s 1
            Viachaslau Tikhanovich [X] (Inactive) made transition -
            Investigate Investigating
            2d 1h 30m 1
            Viachaslau Tikhanovich [X] (Inactive) made transition -
            Investigating Investigated
            6d 1h 1
            Kevin Roast made transition -
            Investigated Resolved
            21h 16m 1
            Ravi Manthena [X] (Inactive) made transition -
            Resolved Reopened
            532d 18h 11m 2
            Mike Farman made transition -
            Reopened Closed
            8d 2m 1

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                lightoze Vladimir Kulev
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 1 hour
                  1d 1h