1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #5049: Unable to web login when quotes in passwd (#174)

Signed-off-by: Ricardo Diaz <rdiaz@opennebula.io>
This commit is contained in:
Ricardo Diaz 2020-09-01 11:55:58 +02:00 committed by GitHub
parent 109c7e7185
commit 2d31acad99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,8 @@ module OpenNebulaCloudAuth
# 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