mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-16 01:33:10 +09:00
feature #1741: escape dn in X509CloudAuth.rb
This commit is contained in:
1 parent
7b9c6561ea
commit
02cd738d8f
1 file changed
+4
-1
@@ -14,6 +14,8 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
require 'opennebula/x509_auth'
|
||||
|
||||
module X509CloudAuth
|
||||
def do_auth(env, params={})
|
||||
# For https, the web service should be set to include the user cert in the environment.
|
||||
@@ -32,7 +34,8 @@ module X509CloudAuth
|
||||
end
|
||||
|
||||
# Password should be DN with whitespace removed.
|
||||
username = get_username(cert.subject.to_s.delete("\s"))
|
||||
username = get_username(
|
||||
OpenNebula::X509Auth.escape_dn(cert.subject.to_s))
|
||||
|
||||
return username if username
|
||||
|
||||
|
||||
Reference in new issue
Block a user