From 58ba3e31fadd6b7a39e41a6481c2fbeb51cfdbc0 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 11 Jan 2024 10:07:06 +0100 Subject: [PATCH] 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 --- htdocs/adherents/class/adherent.class.php | 8 ++++---- htdocs/adherents/ldap.php | 2 +- htdocs/admin/ldap_members.php | 4 ++-- htdocs/admin/ldap_users.php | 4 ++-- htdocs/admin/security.php | 2 +- htdocs/conf/conf.php.example | 2 +- htdocs/contrat/ticket.php | 2 +- htdocs/core/class/commonobject.class.php | 8 ++++---- htdocs/core/lib/security.lib.php | 4 ++-- htdocs/core/lib/security2.lib.php | 12 ++++++------ htdocs/core/login/functions_dolibarr.php | 2 +- htdocs/filefunc.inc.php | 6 +++--- htdocs/ftp/admin/ftpclient.php | 2 +- htdocs/install/check.php | 2 +- htdocs/install/repair.php | 2 +- htdocs/install/step5.php | 2 +- htdocs/install/upgrade.php | 4 ++-- htdocs/install/upgrade2.php | 4 ++-- htdocs/main.inc.php | 4 ++-- htdocs/projet/element.php | 2 +- htdocs/user/card.php | 2 +- htdocs/user/class/user.class.php | 8 ++++---- 22 files changed, 44 insertions(+), 44 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 11a663780cc..464f7e8afab 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1118,8 +1118,8 @@ class Adherent extends CommonObject * * @param User $user Object user de l'utilisateur qui fait la modification * @param string $password New password (to generate if empty) - * @param int $isencrypted 0 ou 1 si il faut crypter le mot de passe en base (0 par defaut) - * @param int $notrigger 1=Ne declenche pas les triggers + * @param int $isencrypted 0 ou 1 if the password needs to be encrypted in the DB (default: 0) + * @param int $notrigger 1=Does not raise the triggers * @param int $nosyncuser Do not synchronize linked user * @return string If OK return clear password, 0 if no change, < 0 if error */ @@ -2812,7 +2812,7 @@ class Adherent extends CommonObject // When password is modified if (!empty($this->pass)) { if (getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')) { - $info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass; // this->pass = mot de passe non crypte + $info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass; // this->pass = Unencrypted password } if (getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD_CRYPTED')) { $info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD_CRYPTED')] = dol_hash($this->pass, 'openldap'); // Create OpenLDAP password (see LDAP_PASSWORD_HASH_TYPE) @@ -2832,7 +2832,7 @@ class Adherent extends CommonObject } elseif (!empty($this->pass_indatabase)) { // Use $this->pass_indatabase value if exists if (getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')) { - $info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte + $info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')] = $this->pass_indatabase; // $this->pass_indatabase = Unencrypted password } if (getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD_CRYPTED')) { $info[getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD_CRYPTED')] = dol_hash($this->pass_indatabase, 'openldap'); // Create OpenLDAP password (see LDAP_PASSWORD_HASH_TYPE) diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 124a4b20f51..37a294740e8 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -122,7 +122,7 @@ print ''; // Login print ''; -// If there is a link to password not crypted, we show value in database here so we can compare because it is shown nowhere else +// If there is a link to the unencrypted password, we show the value in database here so we can compare because it is shown nowhere else if (getDolGlobalString('LDAP_MEMBER_FIELD_PASSWORD')) { print ''; print ''; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 469d8f1735d..7e1828d6a69 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -268,14 +268,14 @@ print ''; print '"; print ''; -// Password not crypted +// Password not encrypted print ''; print ''; print ''; -// Password crypted +// Password encrypted print ''; diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index ca84c912a5e..aa71d0381b6 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -256,14 +256,14 @@ print ''; print '"; print ''; -// Password not crypted +// Password not encrypted print ''; print ''; print ''; -// Password crypted +// Password encrypted print ''; diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 42945587fee..1fe0d90511e 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -37,7 +37,7 @@ if (!$user->admin) { accessforbidden(); } -// Allow/Disallow change to clear passwords once passwords are crypted +// Allow/Disallow change to clear passwords once passwords are encrypted $allow_disable_encryption = true; diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index 4c612256c23..d0ca5f7142e 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -319,7 +319,7 @@ $dolibarr_main_restrict_ip=''; // This might be required if you access Dolibarr behind a proxy that make bad URL rewriting, to avoid false alarms. // In most cases, you should always keep this to 0. // Default value: 0 -// Possible values: 0 or 1 (no strict CSRF test, only test on referer) or 2 (no CSRF test at all) +// Possible values: 0 or 1 (no strict CSRF test, only test on referrer) or 2 (no CSRF test at all) // Examples: // $dolibarr_nocsrfcheck='0'; // diff --git a/htdocs/contrat/ticket.php b/htdocs/contrat/ticket.php index a0c16407247..539b5d0ac98 100644 --- a/htdocs/contrat/ticket.php +++ b/htdocs/contrat/ticket.php @@ -158,7 +158,7 @@ print '
'; /* - * Referers types + * Referrers types */ $title=$langs->trans("ListTicketsLinkToContract"); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 395306e1ff2..dc1b14b3813 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6469,7 +6469,7 @@ abstract class CommonObject case 'password': $algo = ''; if ($this->array_options[$key] != '' && is_array($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options'])) { - // If there is an encryption choice, we use it to crypt data before insert + // If there is an encryption choice, we use it to encrypt data before insert $tmparrays = array_keys($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options']); $algo = reset($tmparrays); if ($algo != '') { @@ -6479,7 +6479,7 @@ abstract class CommonObject if (is_object($this->oldcopy)) { // If this->oldcopy is not defined, we can't know if we change attribute or not, so we must keep value //var_dump('iii'.$algo.' '.$this->oldcopy->array_options[$key].' -> '.$this->array_options[$key]); if (isset($this->oldcopy->array_options[$key]) && $this->array_options[$key] == $this->oldcopy->array_options[$key]) { - // If old value crypted in database is same than submitted new value, it means we don't change it, so we don't update. + // If old value encrypted in database is same than submited new value, it means we don't change it, so we don't update. if ($algo == 'dolcrypt') { // dolibarr reversible encryption if (!preg_match('/^dolcrypt:/', $this->array_options[$key])) { $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master @@ -6893,7 +6893,7 @@ abstract class CommonObject case 'password': $algo = ''; if ($this->array_options["options_".$key] != '' && is_array($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options'])) { - // If there is an encryption choice, we use it to crypt data before insert + // If there is an encryption choice, we use it to encrypt data before insert $tmparrays = array_keys($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options']); $algo = reset($tmparrays); if ($algo != '') { @@ -6903,7 +6903,7 @@ abstract class CommonObject //var_dump($key.' '.$this->array_options["options_".$key].' '.$algo); if (is_object($this->oldcopy)) { // If this->oldcopy is not defined, we can't know if we change attribute or not, so we must keep value //var_dump($this->oldcopy->array_options["options_".$key]); var_dump($this->array_options["options_".$key]); - if (isset($this->oldcopy->array_options["options_".$key]) && $this->array_options["options_".$key] == $this->oldcopy->array_options["options_".$key]) { // If old value crypted in database is same than submitted new value, it means we don't change it, so we don't update. + if (isset($this->oldcopy->array_options["options_".$key]) && $this->array_options["options_".$key] == $this->oldcopy->array_options["options_".$key]) { // If old value encrypted in database is same than submited new value, it means we don't change it, so we don't update. if ($algo == 'dolcrypt') { // dolibarr reversible encryption if (!preg_match('/^dolcrypt:/', $this->array_options["options_".$key])) { $new_array_options["options_".$key] = dolEncrypt($this->array_options["options_".$key]); // warning, must be called when on the master diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 76af618a070..ff149b232db 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -92,7 +92,7 @@ function dol_decode($chain, $key = '1') } /** - * Return a string of random bytes (hexa string) with length = $length fro cryptographic purposes. + * Return a string of random bytes (hexa string) with length = $length for cryptographic purposes. * * @param int $length Length of random string * @return string Random string @@ -130,7 +130,7 @@ function dolEncrypt($chain, $key = '', $ciphering = 'AES-256-CTR', $forceseed = $reg = array(); if (preg_match('/^dolcrypt:([^:]+):(.+)$/', $chain, $reg)) { - // The $chain is already a crypted string + // The $chain is already a encrypted string return $chain; } diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 2f4ac6ac540..3405ba614e6 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -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); diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index f5594e54a93..143dcd33779 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -110,7 +110,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes if (!in_array($cryptType, array('auto'))) { $cryptType = 'auto'; } - // Check crypted password according to crypt algorithm + // Check encrypted password according to encryption algorithm if ($cryptType == 'auto') { if ($passcrypted && dol_verifyHash($passtyped, $passcrypted, '0')) { $passok = true; diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index e46e2f23fad..2f220f9f878 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -236,8 +236,8 @@ if (!defined('NOCSRFCHECK') && isset($dolibarr_nocsrfcheck) && $dolibarr_nocsrfc if ($csrfattack) { //print 'NOCSRFCHECK='.defined('NOCSRFCHECK').' REQUEST_METHOD='.$_SERVER['REQUEST_METHOD'].' HTTP_HOST='.$_SERVER['HTTP_HOST'].' HTTP_REFERER='.$_SERVER['HTTP_REFERER']; // Note: We can't use dol_escape_htmltag here to escape output because lib functions.lib.ph is not yet loaded. - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (Bad referer).", LOG_WARNING); - print "Access refused by CSRF protection in main.inc.php. Referer of form (".htmlentities($_SERVER['HTTP_REFERER'], ENT_COMPAT, 'UTF-8').") is outside the server that serve this page (with method = ".htmlentities($_SERVER['REQUEST_METHOD'], ENT_COMPAT, 'UTF-8').").\n"; + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (Bad referrer).", LOG_WARNING); + print "Access refused by CSRF protection in main.inc.php. Referrer of form (".htmlentities($_SERVER['HTTP_REFERER'], ENT_COMPAT, 'UTF-8').") is outside the server that serve this page (with method = ".htmlentities($_SERVER['REQUEST_METHOD'], ENT_COMPAT, 'UTF-8').").\n"; print "If you access your server behind a proxy using url rewriting, you might check that all HTTP headers are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file to remove this security check).\n"; die; } @@ -372,7 +372,7 @@ if ((!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_ if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); - $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this so we can use it later to know the password was initially crypted + $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this so we can use it later to know the password was initially encrypted } else { $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index ebeb21f2cd6..389c43738b0 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -187,7 +187,7 @@ if (!function_exists('ftp_connect')) { print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index d434a5bdad2..6f295bc7bdd 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -347,7 +347,7 @@ if (!file_exists($conffile)) { if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) { require_once $dolibarr_main_document_root.'/core/lib/security.lib.php'; if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) { - $dolibarr_main_db_encrypted_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); // We need to set this as it is used to know the password was initially crypted + $dolibarr_main_db_encrypted_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); // We need to set this as it is used to know the password was initially encrypted $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } else { $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 4d3e7adfbcb..2b427923e8c 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -111,7 +111,7 @@ if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_d if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); - $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted + $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially encrypted } else { $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index 20035b2f935..f30f1655e3c 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -145,7 +145,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) { if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); - $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted + $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially encrypted } else { $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 0a0c2d63219..0802f57b9f5 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -123,13 +123,13 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); - $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted + $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially encrypted } else { $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } } - // $conf is already instancied inside inc.php + // $conf is already instantiated inside inc.php $conf->db->type = $dolibarr_main_db_type; $conf->db->host = $dolibarr_main_db_host; $conf->db->port = $dolibarr_main_db_port; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index bcdb8b73da5..cd8596f26a0 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -130,13 +130,13 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); - $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted + $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially encrypted } else { $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } } - // $conf is already instancied inside inc.php + // $conf is already instanciated inside inc.php $conf->db->type = $dolibarr_main_db_type; $conf->db->host = $dolibarr_main_db_host; $conf->db->port = $dolibarr_main_db_port; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index f923b9466a9..7fc2ca7777d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -595,7 +595,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( $sessiontokenforthisurl = (empty($_SESSION['token']) ? '' : $_SESSION['token']); // TODO Get the sessiontokenforthisurl into an array of session token (one array per base URL so we can use the CSRF per page and we keep ability for several tabs per url in a browser) if (GETPOSTISSET('token') && GETPOST('token') != 'notrequired' && GETPOST('token', 'alpha') != $sessiontokenforthisurl) { - dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (invalid token), so we disable POST and some GET parameters - referer=".(empty($_SERVER['HTTP_REFERER'])?'':$_SERVER['HTTP_REFERER']).", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha'), LOG_WARNING); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRF protection (invalid token), so we disable POST and some GET parameters - referrer=".(empty($_SERVER['HTTP_REFERER'])?'':$_SERVER['HTTP_REFERER']).", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha'), LOG_WARNING); //dol_syslog("_SESSION['token']=".$sessiontokenforthisurl, LOG_DEBUG); // Do not output anything on standard output because this create problems when using the BACK button on browsers. So we just set a message into session. if (!defined('NOTOKENRENEWAL')) { @@ -1347,7 +1347,7 @@ if (!defined('NOLOGIN')) { } dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''), LOG_NOTICE); -//Another call for easy debugg +//Another call for easy debug //dol_syslog("Access to ".$_SERVER["PHP_SELF"].' '.$_SERVER["HTTP_REFERER"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST)); // Load main languages files diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 4ad1b9d50cb..fe4af44cdff 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -376,7 +376,7 @@ print dol_get_fiche_end(); print '
'; /* - * Referers types + * Referrer types */ $listofreferent = array( diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f27a82d84c8..865161adc5f 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1886,7 +1886,7 @@ if ($action == 'create' || $action == 'adduserldap') { if ($user->admin && $user->id == $object->id) { $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); $valuetoshow .= ''.$langs->trans("Hidden").''; - $valuetoshow .= ''; + $valuetoshow .= ''; } else { $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); $valuetoshow .= ''.$langs->trans("Hidden").''; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 82669223ad6..dc4a6af1735 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -193,7 +193,7 @@ class User extends CommonObject public $pass; /** - * @var string Crypted password in memory + * @var string Encrypted password in memory */ public $pass_crypted; @@ -1842,7 +1842,7 @@ class User extends CommonObject if (is_int($newpass) && $newpass < 0) { $result = -2; } - } elseif (!empty($this->pass_crypted)) { // If a crypted password is already known, we save it directly into database because the previous create did not save it. + } elseif (!empty($this->pass_crypted)) { // If an encrypted password is already known, we save it directly into database because the previous create did not save it. $sql = "UPDATE ".$this->db->prefix()."user"; $sql .= " SET pass_crypted = '".$this->db->escape($this->pass_crypted)."'"; $sql .= " WHERE rowid=".((int) $this->id); @@ -2112,7 +2112,7 @@ class User extends CommonObject // Update password if (!empty($this->pass)) { if ($this->pass != $this->pass_indatabase && !dol_verifyHash($this->pass, $this->pass_indatabase_crypted)) { - // If a new value for password is set and different than the one crypted into database + // If a new value for password is set and different than the one encrypted into database $result = $this->setPassword($user, $this->pass, 0, $notrigger, $nosyncmemberpass, 0, 1); if (is_int($result) && $result < 0) { return -5; @@ -2326,7 +2326,7 @@ class User extends CommonObject * @param int $changelater 0=Default, 1=Save password into pass_temp to change password only after clicking on confirm email * @param int $notrigger 1=Does not launch triggers * @param int $nosyncmember Do not synchronize linked member - * @param int $passwordalreadycrypted 0=Value is cleartext password, 1=Value is crypted value. + * @param int $passwordalreadycrypted 0=Value is cleartext password, 1=Value is encrypted value. * @param int $flagdelsessionsbefore 1=Save also the current date to ask to invalidate all other session before this date. * @return string If OK return clear password, 0 if no change (warning, you may retrieve 1 instead of 0 even if password was same), < 0 if error */
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("LDAPFieldPasswordNotCrypted").''.$object->pass.''.$langs->trans("LDAPFieldLoginSambaExample").'global->LDAP_KEY_MEMBERS && $conf->global->LDAP_KEY_MEMBERS == $conf->global->LDAP_MEMBER_FIELD_LOGIN_SAMBA) ? ' checked' : '').">
'.$langs->trans("LDAPFieldPasswordNotCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldPasswordCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").''.$langs->trans("LDAPFieldLoginSambaExample").'
'.$langs->trans("LDAPFieldPasswordNotCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldPasswordCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").'
'.$langs->trans("Port").'21 for pure non crypted FTP or if option FTP_CONNECT_WITH_SSL (See Home-Setup-Other) is on (FTPS)
22 if option FTP_CONNECT_WITH_SFTP (See Home-Setup-Other) is on (SFTP)
21 for pure non encrypted FTP or if option FTP_CONNECT_WITH_SSL (See Home-Setup-Other) is on (FTPS)
22 if option FTP_CONNECT_WITH_SFTP (See Home-Setup-Other) is on (SFTP)