You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
add in some @deprecated notifices
This commit is contained in:
@@ -935,6 +935,7 @@ function validate_password($password)
|
|||||||
* @param string $pw
|
* @param string $pw
|
||||||
* @param string $pw_db - encrypted hash
|
* @param string $pw_db - encrypted hash
|
||||||
* @return string crypt'ed password, should equal $pw_db if $pw matches the original
|
* @return string crypt'ed password, should equal $pw_db if $pw matches the original
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function _pacrypt_md5crypt($pw, $pw_db = '')
|
function _pacrypt_md5crypt($pw, $pw_db = '')
|
||||||
{
|
{
|
||||||
@@ -951,6 +952,7 @@ function _pacrypt_md5crypt($pw, $pw_db = '')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo fix this to not throw an E_NOTICE or deprecate/remove.
|
* @todo fix this to not throw an E_NOTICE or deprecate/remove.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function _pacrypt_crypt($pw, $pw_db = '')
|
function _pacrypt_crypt($pw, $pw_db = '')
|
||||||
{
|
{
|
||||||
@@ -1304,6 +1306,7 @@ function pacrypt($pw, $pw_db = "")
|
|||||||
* @param string $salt (optional)
|
* @param string $salt (optional)
|
||||||
* @param string $magic (optional)
|
* @param string $magic (optional)
|
||||||
* @return string hashed password in crypt format.
|
* @return string hashed password in crypt format.
|
||||||
|
* @deprecated see PFACrypt::cryptMd5() (note this returns {MD5} prefix
|
||||||
*/
|
*/
|
||||||
function md5crypt($pw, $salt="", $magic="")
|
function md5crypt($pw, $salt="", $magic="")
|
||||||
{
|
{
|
||||||
|
@@ -9,7 +9,7 @@ class PFACrypt
|
|||||||
$this->algorithm = $algorithm;
|
$this->algorithm = $algorithm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hash(string $pw, $pw_db)
|
public function hash(string $pw, string $pw_db = ''): string
|
||||||
{
|
{
|
||||||
$algorithm = $this->algorithm;
|
$algorithm = $this->algorithm;
|
||||||
|
|
||||||
@@ -94,7 +94,8 @@ class PFACrypt
|
|||||||
return '{CRYPT}' . crypt($pw, $pw_db);
|
return '{CRYPT}' . crypt($pw, $pw_db);
|
||||||
|
|
||||||
case 'system':
|
case 'system':
|
||||||
return _pacrypt_crypt($pw, $pw_db);
|
return crypt($pw, $pw_db);
|
||||||
|
|
||||||
case 'cleartext':
|
case 'cleartext':
|
||||||
return $pw;
|
return $pw;
|
||||||
case 'CLEAR':
|
case 'CLEAR':
|
||||||
|
Reference in New Issue
Block a user