diff --git a/scripts/openvpn-auth.py b/scripts/openvpn-auth.py index 6cedcbb..750008c 100755 --- a/scripts/openvpn-auth.py +++ b/scripts/openvpn-auth.py @@ -11,7 +11,7 @@ if not password: file = open('/opt/openvpn/users/'+username+'.pwd', 'r') hashed=file.read().rstrip() -if bcrypt.hashpw(password, hashed) == hashed: +if bcrypt.hashpw(password.encode('utf-8'), hashed.encode('utf-8')) == hashed.encode('utf-8'): sys.exit(0) else: sys.exit(1)