mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Moves to \S+ check instead of \w+-\w+
* Adds changelog fragment
* Update changelogs/fragments/892-slack-token-validation.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Josh VanDeraa <josh.vanderaa@networktocode.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1eb3ab3b27
)
Co-authored-by: Josh VanDeraa <josh.vanderaa+github@networktocode.com>
This commit is contained in:
parent
71633249c4
commit
83339c44b3
2 changed files with 4 additions and 1 deletions
3
changelogs/fragments/892-slack-token-validation.yml
Normal file
3
changelogs/fragments/892-slack-token-validation.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
bugfixes:
|
||||
- slack - fix ``xox[abp]`` token identification to capture everything after ``xox[abp]``, as the token is the only thing that should be in this argument (https://github.com/ansible-collections/community.general/issues/862).
|
|
@ -314,7 +314,7 @@ def do_notify_slack(module, domain, token, payload):
|
|||
if token.count('/') >= 2:
|
||||
# New style webhook token
|
||||
slack_uri = SLACK_INCOMING_WEBHOOK % (token)
|
||||
elif re.match(r'^xox[abp]-\w+-\w+$', token):
|
||||
elif re.match(r'^xox[abp]-\S+$', token):
|
||||
slack_uri = SLACK_POSTMESSAGE_WEBAPI
|
||||
use_webapi = True
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue