Skip to content
Snippets Groups Projects
Commit 770e5eeb authored by Thomas Negre's avatar Thomas Negre
Browse files

FIX too long on email page : avoid infinite recursion on special chars in email value

parent 21864e40
No related branches found
No related tags found
2 merge requests!47FIX too long loading of some pages,!46FIX too long on email page : avoid infinite recursion on special chars in email value
Pipeline #6343 passed with warnings
......@@ -3,6 +3,9 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [Non Distribué]
## [14.0.13] - 07-04-2025
- FIX : chargement trop long de certaines pages.
## [14.0.12] - 17-02-2025
- FIX : Compatibilité v21
- Correction d'une traduction
......@@ -170,7 +173,8 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [4.0.0] - 08-09-2017
- Version initial.
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/compare/14.0.11...HEAD
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/compare/14.0.13...HEAD
[14.0.13]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.13
[14.0.12]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.12
[14.0.11]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.11
[14.0.10]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.10
......
14.0.12
14.0.13
......@@ -519,7 +519,11 @@ function extendedemail_get_email_infos(text, type, id, replace_parenthesis)
// Check email
var email = $.trim(match[1]);
if (match[2]) email = match[2];
if (extendedemail_regex_email.test(email)) {
// extendedemail_regex_email.test creates "too much recursion" error on following `email` value : `John DOE - Attachée de communication- accueil et suivi des résidences d'artistes (Pas d'email)`
// This is due to char `'` that is allowed in the regex (why ?)
// So we just drop if there is no `@`, this will avoid some mistakes.
if (email.search('@') != -1 && extendedemail_regex_email.test(email)) {
if (match[2]) {
return {
id: type != '' ? (type + ':' + (type == 'p' ? match[2] : id)) : id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment