feature #1741: escape dn in X509CloudAuth.rb

This commit is contained in:
Javi Fontan committed 2013-02-22 16:59:46 +01:00
1 parent 7b9c6561ea
commit 02cd738d8f
1 file changed
+4 -1
+4 -1
View File
@@ -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