0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

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/branches/postfixadmin-2.3@1333 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz 2012-01-15 11:22:31 +00:00
parent bf0892aa9c
commit fac93bf28b

View File

@ -1191,7 +1191,7 @@ function pacrypt ($pw, $pw_db="")
{
$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."');");