Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipe `slack-notify` doesn't escape double quote (") character

awerlang March 5, 2019

We added the slack pipe integration and it was doing fine for a week or so. But then a build failed during the slack step.

The Slack pipe produces a malformed json to send over the Stack API. It fails to escape any double quotes character provided in the message.

The pipe should handle any input, and be able to produce a valid json payload.

  • the version of the pipe
    • 0.2.1
  • relevant logs and error messages
    • INFO: HTTP Response: invalid_payload
      ✖ Notification failed.
  • steps to reproduce
script:
- MESSAGE="it doesn't escape the \" character"
- pipe: atlassian/slack-notify:0.2.1 variables: WEBHOOK_URL: $WEBHOOK_URL MESSAGE: "$MESSAGE"

 

 

1 answer

1 accepted

1 vote
Answer accepted
Graham Gatus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2019

@awerlang this has now been fixed in version 0.2.3 of the pipe. Thanks for the bug report!

masterkain November 4, 2019

this breaks newlines, using `\n` results in a `\\n`

 

edit: mm, got it working surrounding the message with " instead of '

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events