mirror of https://github.com/apache/cloudstack.git
setup: Fixed error when passing shell reserved characters to setup databases (#4995)
* Fixed error when passing shell reserved charaters to setup databases script for dbsecret * Moved quote to encrypt method
This commit is contained in:
parent
4df8d7ade3
commit
7a7fd27350
|
|
@ -26,6 +26,7 @@ import string
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
|
import shlex
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
# squelch mysqldb spurious warnings
|
# squelch mysqldb spurious warnings
|
||||||
|
|
@ -399,7 +400,7 @@ for example:
|
||||||
return 'ENC(%s)'%value
|
return 'ENC(%s)'%value
|
||||||
|
|
||||||
def encryptDBSecretKey():
|
def encryptDBSecretKey():
|
||||||
self.putDbProperty('db.cloud.encrypt.secret', formatEncryptResult(encrypt(self.dbsecretkey)))
|
self.putDbProperty('db.cloud.encrypt.secret', formatEncryptResult(encrypt(shlex.quote(self.dbsecretkey))))
|
||||||
|
|
||||||
def encryptDBPassword():
|
def encryptDBPassword():
|
||||||
dbPassword = self.getDbProperty('db.cloud.password')
|
dbPassword = self.getDbProperty('db.cloud.password')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue