Incorrectly formatted JSON in challenge response#99
Incorrectly formatted JSON in challenge response#99seratch merged 3 commits intoslackapi:mainfrom sirdan69:fix-JSON-challenge-response
Conversation
|
@sirdan69 Thanks for taking the time to fix this! Indeed, the current implementation has not been correct -- if you set the content-type header to JSON, the response body must be JSON data. It seems that the server-side just had been allowing the plain text with the content type. We will release a new patch version including your fix later today. |
|
@sirdan69 Can you modify the unit test code as well? |
|
Just modifying this line of code: https://github.com/slackapi/python-slack-events-api/blob/v3.0.0/tests/test_server.py#L56 |
sure. will do... |
Codecov Report
@@ Coverage Diff @@
## main #99 +/- ##
=======================================
Coverage 93.10% 93.10%
=======================================
Files 3 3
Lines 87 87
=======================================
Hits 81 81
Misses 6 6
Continue to review full report at Codecov.
|
seratch
left a comment
There was a problem hiding this comment.
Thank you very much for your contribution!
|
I just released a new patch version (3.0.1) including your fix. Thanks again! |
|
@seratch I just verified the updated library locally. thanks for the quick publish turnaround :) |
Summary
This issue was discovered running Slack in a UAT environment - probably a more recent version of Slack than prod, but I don't know what version. It looks like this is not a regression in the code, but a change on the Slack side to be more picky about the response. The code is wrong, but it has worked.
See: https://api.slack.com/events/url_verification
Requirements (place an
xin each[ ])