MS Teams url parsing token encoding support (#438)

This commit is contained in:
Chris Caron 2021-09-07 07:17:31 -04:00 committed by GitHub
parent 1916a9105d
commit e0f928f0d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,7 +168,7 @@ class NotifyMSTeams(NotifyBase):
'type': 'string', 'type': 'string',
'private': True, 'private': True,
'required': True, 'required': True,
'regex': (r'^[A-Za-z0-9]+$', 'i'), 'regex': (r'^[a-z0-9]+$', 'i'),
}, },
# Token required as part of the API request # Token required as part of the API request
# /........./........./CCCCCCCCCCCCCCCCCCCCCCCC # /........./........./CCCCCCCCCCCCCCCCCCCCCCCC
@ -177,7 +177,7 @@ class NotifyMSTeams(NotifyBase):
'type': 'string', 'type': 'string',
'private': True, 'private': True,
'required': True, 'required': True,
'regex': (r'^[A-Z0-9-]+$', 'i'), 'regex': (r'^[a-z0-9-]+$', 'i'),
}, },
}) })
@ -539,10 +539,13 @@ class NotifyMSTeams(NotifyBase):
results['team'] = NotifyMSTeams.unquote(results['host']) results['team'] = NotifyMSTeams.unquote(results['host'])
# Get the token from the path # Get the token from the path
results['token_a'] = None if not entries else entries.pop(0) results['token_a'] = None if not entries \
else NotifyMSTeams.unquote(entries.pop(0))
results['token_b'] = None if not entries else entries.pop(0) results['token_b'] = None if not entries \
results['token_c'] = None if not entries else entries.pop(0) else NotifyMSTeams.unquote(entries.pop(0))
results['token_c'] = None if not entries \
else NotifyMSTeams.unquote(entries.pop(0))
# Get Image # Get Image
results['include_image'] = \ results['include_image'] = \