[Kimchi-devel] [PATCH] [WoK] Github #143: non-ASCII characters in the password field

dhbarboza82 at gmail.com dhbarboza82 at gmail.com
Thu Oct 20 17:29:20 UTC 2016


From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>

This patch enables WoK backend to read non-ASCII characters from
the password field.

Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
---
 src/wok/auth.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wok/auth.py b/src/wok/auth.py
index 421f8f3..6b1c160 100644
--- a/src/wok/auth.py
+++ b/src/wok/auth.py
@@ -301,8 +301,8 @@ def check_auth_httpba():
 
 def login(username, password, **kwargs):
     auth_args = {'auth_type': config.get("authentication", "method"),
-                 'username': username,
-                 'password': password}
+                 'username': username.encode('utf-8'),
+                 'password': password.encode('utf-8')}
 
     user = User.get(auth_args)
     if not user:
-- 
2.7.4




More information about the Kimchi-devel mailing list