mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Bug #3745: encode password to allow all chars
This commit is contained in:
parent
bd7c2853ba
commit
c2a6c673fb
@ -16,6 +16,7 @@
|
||||
|
||||
require 'time'
|
||||
require 'rubygems'
|
||||
require 'cgi'
|
||||
|
||||
begin
|
||||
require 'sequel'
|
||||
@ -284,7 +285,9 @@ class BackEndMySQL < OneDBBacKEnd
|
||||
private
|
||||
|
||||
def connect_db
|
||||
endpoint = "mysql://#{@user}:#{@passwd}@#{@server}:#{@port}/#{@db_name}"
|
||||
passwd = CGI.escape(@passwd)
|
||||
|
||||
endpoint = "mysql://#{@user}:#{passwd}@#{@server}:#{@port}/#{@db_name}"
|
||||
|
||||
begin
|
||||
@db = Sequel.connect(endpoint)
|
||||
@ -337,4 +340,4 @@ class BackEndSQLite < OneDBBacKEnd
|
||||
raise "Error connecting to DB: " + e.message
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user