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

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

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          New New Open Open
          4m 21s 1 Derek Hulley 09-Feb-12 03:21 PM
          Open Open Need Info Need Info
          1d 4h 34m 2 Andrew Hind 10-Feb-12 08:41 PM
          Need Info Need Info Open Open
          1h 40m 2 Vladimir Kulev 10-Feb-12 09:36 PM
          Open Open Resolved Resolved
          9d 16h 26m 1 Steven Glover 20-Feb-12 02:03 PM
          Reopened Reopened Open Open
          4d 1h 9m 1 Kevin Roast 05-Aug-13 10:49 AM
          Open Open Investigate Investigate
          18s 1 Kevin Roast 05-Aug-13 10:50 AM
          Investigate Investigate Investigating Investigating
          2d 1h 30m 1 Viachaslau Tikhanovich 07-Aug-13 12:21 PM
          Investigating Investigating Investigated Investigated
          6d 1h 1 Viachaslau Tikhanovich 13-Aug-13 01:21 PM
          Investigated Investigated Resolved Resolved
          21h 16m 1 Kevin Roast 14-Aug-13 10:38 AM
          Resolved Resolved Reopened Reopened
          532d 18h 11m 2 Ravi Manthena 19-Aug-13 10:12 AM
          Reopened Reopened Closed Closed
          8d 2m 1 Mike Farman 27-Aug-13 10:14 AM

            People

            • Assignee:
              Closed Issues
              Reporter:
              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