diff --git a/ChangeLog b/ChangeLog index cebbbafe7f1..e3b19e0dbd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,9 +7,13 @@ English Dolibarr ChangeLog For users: ---------- + + For developers: --------------- + + WARNING: -------- The following changes may create regressions for some external modules, but were necessary to make Dolibarr better: @@ -207,7 +211,7 @@ The following changes may create regressions for some external modules, but were ***** ChangeLog for 21.0.4 compared to 21.0.3 ***** FIX: #35147 SQL Error on Beluga Export when ExpenseReport is enabled (#35149) FIX: error when using a code too large in dictionary -FIX: Security when using feature Advanced Target of emailing (hidden in v21, default in v22+). Possible +FIX: Security when using Advanced Target page of emailing (feature hidden in v21, default in v22+). Possible SQL injection by users with permission to make and send mass emailing. diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 10b89f2a8c8..0c2aa9e4682 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1667,10 +1667,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnValid()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
'.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; + $tmp .= '
'.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).', '; $tmp .= '
'.$langs->trans("MailRecipient").': '.$object->email.''; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; @@ -1731,10 +1731,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnResiliate()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; + $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).', '; $tmp .= $langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; @@ -1792,10 +1792,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnExclude()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; + $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).', '; $tmp .= $langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index b92f93dfb38..7f9d35dcb8a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -505,11 +505,8 @@ class Adherent extends CommonObject $texttosend = dol_htmlentitiesbr($texttosend); } - // Envoi mail confirmation - $from = $conf->email_from; - if (getDolGlobalString('ADHERENT_MAIL_FROM')) { - $from = getDolGlobalString('ADHERENT_MAIL_FROM'); - } + // Send mail confirmation + $from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from); $trackid = 'mem'.$this->id; @@ -3188,7 +3185,7 @@ class Adherent extends CommonObject $subject = make_substitutions($arraydefaultmessage->topic, $substitutionarray, $outputlangs); $msg = make_substitutions($arraydefaultmessage->content, $substitutionarray, $outputlangs); - $from = getDolGlobalString('ADHERENT_MAIL_FROM'); + $from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from); $to = $adherent->email; $cc = getDolGlobalString('ADHERENT_CC_MAIL_FROM'); diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 56c2f7e9639..ca0ee7abd29 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -1187,7 +1187,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h $tmp = ''; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("MailTopic").':
'."\n"; if ($subjecttosend) { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d6e566ba2e9..e1b3e2b0a7b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -640,7 +640,7 @@ Module240Desc=Tool to export Dolibarr data (with assistance) Module250Name=Data imports Module250Desc=Tool to import data into Dolibarr (with assistance) Module310Name=Members -Module310Desc=Foundation members management +Module310Desc=Management of association members and their membership Module320Name=RSS Feed Module320Desc=Add a RSS feed to Dolibarr pages Module330Name=Bookmarks & Shortcuts diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index d21c173517c..4cbf2691b0a 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -421,13 +421,13 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he $appli .= " ".DOL_VERSION; } - $to = $adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL); - $from = getDolGlobalString('ADHERENT_MAIL_FROM'); + $to = $adh->makeSubstitution(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')); + $from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from); $mailfile = new CMailFile( '['.$appli.'] ' . getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'), $to, $from, - $adh->makeSubstitution($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL), + $adh->makeSubstitution(getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL')), array(), array(), array(),