From 072d1b9db6a061507ae6328fcda82a393721274c Mon Sep 17 00:00:00 2001 From: Adarnof Date: Mon, 2 Apr 2018 20:38:12 -0400 Subject: [PATCH] Sanitize username on Discord user join. Thanks @iakopo --- services/modules/discord/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/modules/discord/manager.py b/services/modules/discord/manager.py index b2429122..d3d248ce 100644 --- a/services/modules/discord/manager.py +++ b/services/modules/discord/manager.py @@ -206,7 +206,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)