It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,051 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you