1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-30 22:50:10 +03:00

M #-: Avoid login failure when quote in password

This commit is contained in:
Tino Vazquez 2019-10-24 16:07:00 +02:00
parent d0fd7d2f0a
commit 09f4c93b0c
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE

View File

@ -83,9 +83,9 @@ 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"]
auth_name = user.name
egid = user["//LOGIN_TOKEN [ TOKEN = \"#{password}\" ]/EGID"] rescue nil
auth_name = "#{auth_name}:#{egid}" if egid
return auth_name