mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-17 11:49:29 +00:00
Fix encoding on bookmark name and username
This commit is contained in:
@@ -13,7 +13,8 @@ class TS3Service(BaseService):
|
|||||||
'sa_password': '',
|
'sa_password': '',
|
||||||
'vhost_id': 0,
|
'vhost_id': 0,
|
||||||
'authed_sgid': 12,
|
'authed_sgid': 12,
|
||||||
'name_format': '%(alliance)s - %(corporation)s - %(name)s'}
|
'name_format': '%(alliance)s - %(corporation)s - %(name)s',
|
||||||
|
'bookmark_name': 'TEST Alliance TS3'}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
@@ -40,7 +41,7 @@ class TS3Service(BaseService):
|
|||||||
|
|
||||||
if 'keys' in ret and 'token' in ret['keys']:
|
if 'keys' in ret and 'token' in ret['keys']:
|
||||||
token = ret['keys']['token']
|
token = ret['keys']['token']
|
||||||
url = "<a href='ts3server://%s?%s/'>Register</a>" % (self.settings['host'], urllib.urlencode({'nickname': username, 'addbookmark': 'TEST Alliance TS3', 'token': token}))
|
url = "<a href='ts3server://%s?%s/'>Register</a>" % (self.settings['host'], urllib.urlencode({'nickname': urllib.quote(username), 'addbookmark': urllib.quote(self.settings['bookmark_name'], 'token': token}))
|
||||||
return { 'username': username, 'permission token': token, 'registration url': url }
|
return { 'username': username, 'permission token': token, 'registration url': url }
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user