You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Publishing comments failed, because plugin doesn't escape error message content and Stash attempts to interpret \ prefixed characters . For example, comment:
Found 1 violation:
Reporter: PYLINT
Rule: anomalous-backslash-in-string
Severity: WARN
File: fs/csm/admin_api/admin_api.py L1086
Anomalous backslash in string: '\s'. String constant might be missing an r prefix.
<this is a auto generated comment from violation-comments-lib F7F8ASD8123FSDF>
Gets POSTed as:
$ curl -u user:pass -X POST -H 'Content-Type: application/json' -d "{\"text\": \"Found 1 violation:\n\nReporter: PYLINT\nRule: anomalous-backslash-in-string\nSeverity: WARN\nFile: fs/csm/admin_api/auth.py L52\n \n\nAnomalous backslash in string: '\.'. String constant might be missing an r prefix.\n\n<this is a auto generated comment from violation-comments-lib F7F8ASD8123FSDF>\"}" https://mystash.gtn/rest/api/1.0/projects/COSMOS/repos/cosmos/pull-requests/185/comments
{"errors":[{"context":null,"message":"Unrecognized character escape 's' (code 115)\n at [Source: com.atlassian.stash.internal.web.util.web.CountingServletInputStream@31131921; line: 1, column: 186]","exceptionName":"org.codehaus.jackson.JsonParseException"}]}root@a53ac6de14b0:/#
Adding double escaping (from shell) works:
$ curl -u user:pass -X POST -H 'Content-Type: application/json' -d "{\"text\": \"Found 1 violation:\n\nReporter: PYLINT\nRule: anomalous-backslash-in-string\nSesm/admin_api/admin_api.py L1086\n \n\nAnomalous backslash in string: '\\\s'. String constant might be missing an r prefix.\n\n<this is a auto generated comment from violation-comments-lib F7F8ASD8123FSDF>\"}" https://mystash.gtn/rest/api/1.0/projects/COSMOS/repos/cosmos/pull-requests/185/comments
{"properties":{"repositoryId":713},"id":121713,"version":0,"text":"Found 1 violation:\n\nReporter: PYLINT\nRule: anomalous-backslash-in-string\nSeverity: WARN\nFile: fs/csm/admin_api/admin_api.py L1086\n \n\nAnomalous backslash in string: '\\s'. String constant might be missing an r prefix.\n\n<this is a auto generated comment from violation-comments-lib F7F8ASD8123FSDF>","author":{"name":"rd-team-essentials-s","emailAddress":"","id":4763,"displayName":"rd-team-essentials-s","active":true,"slug":"rd-team-essentials-s","type":"NORMAL","links":{"self":[{"href":"https://mystash.gtn/users/rd-team-essentials-s"}]}},"createdDate":1477403666741,"updatedDate":1477403666741,"comments":[],"tasks":[],"permittedOperations":{"editable":true,"deletable":true}}
The text was updated successfully, but these errors were encountered:
Publishing comments failed, because plugin doesn't escape error message content and Stash attempts to interpret
\
prefixed characters . For example, comment:Gets POSTed as:
Adding double escaping (from shell) works:
The text was updated successfully, but these errors were encountered: