Incoming webhook request processing fails on parsing "special" characters

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 8.2.0
    • Component/s: Fields, Smart-values, Triggers
    • Severity 2 - Major
    • 2

      Issue Summary

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      Expected Results

      incoming processing of webhook request data can handle special characters such as line breaks and double quotes, and whatever we can put into an issue field, for example "issue.description

      Actual Results

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>Unexpected character ('Y' (code 89)): was expecting comma to separate OBJECT entries at [Source: org.apache.catalina.connector.CoyoteInputStream@75f373b8; line: 3, column: 31]</message><stack-trace>org.codehaus.jackson.JsonParseException: Unexpected character ('Y' (code 89)): was expecting comma to separate OBJECT entries at [Source: org.apache.catalina.connector.CoyoteInputStream@75f373b8; line: 3, column: 31] at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433) at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521) at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442) at org.codehaus.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:482) at org.codehaus.jackson.map.deser.std.UntypedObjectDeserializer.mapObject(UntypedObjectDeserializer.java:197) at or...

      Workaround

      We can try one of these methods

      1. use jsonEncode
      2. use htmlEncode
      3. use either jsonEncode or htmlEncode and replace() to replace known problematic characters

      In one scenario, the text from the SLA Breach Summary cannot be encoded correctly using jsonEncode, and we ended up using htmlEncode to get around it.

      In another case, posting a comment that contains a Table with special characters will work with just jsonEncode alone.

      There may be edge cases where we have to replace() special characters to remove them or escape them manually.

            Assignee:
            Unassigned
            Reporter:
            Johnny Mon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: