mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Sanitize username on Discord user join.
Thanks @iakopo
This commit is contained in:
parent
8c957e9cb7
commit
072d1b9db6
@ -206,7 +206,7 @@ class DiscordOAuthManager:
|
|||||||
'access_token': token,
|
'access_token': token,
|
||||||
}
|
}
|
||||||
if nickname:
|
if nickname:
|
||||||
data['nick'] = nickname
|
data['nick'] = DiscordOAuthManager._sanitize_name(nickname)
|
||||||
custom_headers['authorization'] = 'Bot ' + settings.DISCORD_BOT_TOKEN
|
custom_headers['authorization'] = 'Bot ' + settings.DISCORD_BOT_TOKEN
|
||||||
r = requests.put(path, headers=custom_headers, json=data)
|
r = requests.put(path, headers=custom_headers, json=data)
|
||||||
logger.debug("Got status code %s after joining Discord server" % r.status_code)
|
logger.debug("Got status code %s after joining Discord server" % r.status_code)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user