mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Qual: Fix spelling for crypted and referer (#27408)
# Qual: Fix spelling for crypted and referer. The proper spelling is encrypted and referrer, but the code has some occurences where referer and crypted need to be maintained. To make verification easier, this spelling correction is limited to mostly these corrections and some minor translations and a only a few other corrections. crypted and referer are added as exceptions for spelling after this fix. Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -335,11 +335,11 @@ if (!function_exists('dol_loginfunction')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction pour initialiser un salt pour la fonction crypt.
|
||||
* Initialise the salt for the crypt function.
|
||||
*
|
||||
* @param int $type 2=>renvoi un salt pour cryptage DES
|
||||
* 12=>renvoi un salt pour cryptage MD5
|
||||
* non defini=>renvoi un salt pour cryptage par defaut
|
||||
* @param int $type 2 =>Return a salt for DES encryption
|
||||
* 12=>Return a salt for MD5 encryption
|
||||
* Undefined=>Return a salt for default encryption
|
||||
* @return string Salt string
|
||||
*/
|
||||
function makesalt($type = CRYPT_SALT_LENGTH)
|
||||
@@ -351,7 +351,7 @@ function makesalt($type = CRYPT_SALT_LENGTH)
|
||||
$saltprefix = '$1$';
|
||||
$saltsuffix = '$';
|
||||
break;
|
||||
case 8: // 8 (Pour compatibilite, ne devrait pas etre utilise)
|
||||
case 8: // 8 (For compatibility, do not use this)
|
||||
$saltlen = 8;
|
||||
$saltprefix = '$1$';
|
||||
$saltsuffix = '$';
|
||||
@@ -393,7 +393,7 @@ function encodedecode_dbpassconf($level = 0)
|
||||
$lineofpass = 0;
|
||||
|
||||
$reg = array();
|
||||
if (preg_match('/^[^#]*dolibarr_main_db_encrypted_pass[\s]*=[\s]*(.*)/i', $buffer, $reg)) { // Old way to save crypted value
|
||||
if (preg_match('/^[^#]*dolibarr_main_db_encrypted_pass[\s]*=[\s]*(.*)/i', $buffer, $reg)) { // Old way to save encrypted value
|
||||
$val = trim($reg[1]); // This also remove CR/LF
|
||||
$val = preg_replace('/^["\']/', '', $val);
|
||||
$val = preg_replace('/["\'][\s;]*$/', '', $val);
|
||||
|
||||
Reference in New Issue
Block a user