From 2d31acad9918b6143d17dd3a8e6930239e0d0473 Mon Sep 17 00:00:00 2001 From: Ricardo Diaz Date: Tue, 1 Sep 2020 11:55:58 +0200 Subject: [PATCH] B #5049: Unable to web login when quotes in passwd (#174) Signed-off-by: Ricardo Diaz --- src/cloud/common/CloudAuth/OpenNebulaCloudAuth.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cloud/common/CloudAuth/OpenNebulaCloudAuth.rb b/src/cloud/common/CloudAuth/OpenNebulaCloudAuth.rb index 2d9f9e92e90..a9e67c666b9 100644 --- a/src/cloud/common/CloudAuth/OpenNebulaCloudAuth.rb +++ b/src/cloud/common/CloudAuth/OpenNebulaCloudAuth.rb @@ -83,7 +83,8 @@ def do_auth(env, params={}) # Check if the user authenticated with a scoped token. In this case # encode the EGID in the username as "user:egid" - egid = user["//LOGIN_TOKEN [ TOKEN = \"#{password}\" ]/EGID"] + egid = nil + egid = user["//LOGIN_TOKEN [ TOKEN = \"#{password}\" ]/EGID"] if password.match(/^[a-z0-9]+$/) auth_name = user.name auth_name = "#{auth_name}:#{egid}" if egid