diff options
| author | Eugene Kirpichov <ekirpichov@gmail.com> | 2012-11-22 14:16:25 +0000 |
|---|---|---|
| committer | Eugene Kirpichov <ekirpichov@gmail.com> | 2012-11-23 13:32:46 +0000 |
| commit | 2aff4bf63ca57e0ec1290983f3109e484b95935f (patch) | |
| tree | 7f7c91cb22360c70082da7cda0d8545f9885b3cd /nova | |
| parent | 2e1ff2e72580c2e9b123aded0916ebb5358b2aea (diff) | |
| download | nova-2aff4bf63ca57e0ec1290983f3109e484b95935f.tar.gz nova-2aff4bf63ca57e0ec1290983f3109e484b95935f.tar.xz nova-2aff4bf63ca57e0ec1290983f3109e484b95935f.zip | |
Encode consoleauth token in utf-8 to make it a str
Fix for lp:1057279.
Change-Id: I9da0fd42e919aca0075613c4930ebfc3cf425349
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/consoleauth/manager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/consoleauth/manager.py b/nova/consoleauth/manager.py index 910332633..23d0a06f6 100644 --- a/nova/consoleauth/manager.py +++ b/nova/consoleauth/manager.py @@ -66,11 +66,11 @@ class ConsoleAuthManager(manager.Manager): 'internal_access_path': internal_access_path, 'last_activity_at': time.time()} data = jsonutils.dumps(token_dict) - self.mc.set(token, data, CONF.console_token_ttl) + self.mc.set(token.encode('UTF-8'), data, CONF.console_token_ttl) LOG.audit(_("Received Token: %(token)s, %(token_dict)s)"), locals()) def check_token(self, context, token): - token_str = self.mc.get(token) + token_str = self.mc.get(token.encode('UTF-8')) token_valid = (token_str is not None) LOG.audit(_("Checking Token: %(token)s, %(token_valid)s)"), locals()) if token_valid: |
