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