mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-19 23:00:22 -07: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
|
@ -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…
Add table
Add a link
Reference in a new issue