functions.inc.php:

- pacrypt(): escape_string() $salt for mysql_encrypt to be on the safe side


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1332 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 13 years ago
parent e3b242e4d8
commit 4e5bd47183

@ -1101,7 +1101,7 @@ function pacrypt ($pw, $pw_db="") {
elseif ($CONF['encrypt'] == 'mysql_encrypt') {
$pw = escape_string($pw);
if ($pw_db!="") {
$salt=substr($pw_db,0,2);
$salt=escape_string(substr($pw_db,0,2));
$res=db_query("SELECT ENCRYPT('".$pw."','".$salt."');");
} else {
$res=db_query("SELECT ENCRYPT('".$pw."');");

Loading…
Cancel
Save