From e374ebf26b243e071dc49e8da04f9c3158a4e6e8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jul 2023 14:17:38 +0200 Subject: [PATCH 01/47] Debug v18 --- htdocs/core/class/html.formcompany.class.php | 4 ++-- htdocs/core/tpl/contacts.tpl.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index a89fd916c94..042ec7c6864 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -753,14 +753,14 @@ class FormCompany extends Form if ($disabled) { print ' disabled'; } - print ' selected>' . dol_trunc($obj->name, 24) . ''; + print ' selected>' . dol_escape_htmltag($obj->name, 0, 0, '', 0, 1) . ''; $firstCompany = $obj->rowid; } else { print ''; + print '>' . dol_escape_htmltag($obj->name, 0, 0, '', 0, 1) . ''; } $i++; } diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 0b6c6fb9939..7f4b3971205 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -143,7 +143,8 @@ if ($permission) {
socid) ? 0 : $object->socid); - $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?> + $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); // This also print the select component + ?>
Date: Mon, 31 Jul 2023 14:34:56 +0200 Subject: [PATCH 02/47] Code comment --- htdocs/takepos/genimg/index.php | 6 +++++- htdocs/takepos/genimg/qr.php | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index 84ce27868ae..17dfdd71629 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -15,7 +15,8 @@ * along with this program. If not, see . */ -// This page return an image of a photo +// This page return an image of public photos of a category or product. +// Test to check image can be publically viewed is done inside the viewimage.php wrapper. //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language @@ -45,6 +46,9 @@ $w = GETPOST('w', 'int'); $h = GETPOST('h', 'int'); $query = GETPOST('query', 'alpha'); +if (!isModEnabled('takepos')) { + accessforbidden('Module not enabled'); +} /* diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index b289814f9e1..fd273c4d07d 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +16,8 @@ * along with this program. If not, see . */ -// This page return an image of a QR code +// This page return an image of a QR code of a public link +// Note: Generating a QR code from a string, like done by this script, can be done with any online tool. if (!defined("NOLOGIN")) { define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) @@ -46,6 +48,10 @@ require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file +if (!isModEnabled('takepos')) { + accessforbidden('Module not enabled'); +} + /* * View From a1a8ad215955238ba4ae56d3fac46c8aad0f38d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jul 2023 14:50:27 +0200 Subject: [PATCH 03/47] FIX #yogosha17287 --- htdocs/ticket/card.php | 2 +- htdocs/ticket/class/actions_ticket.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 1baabd1e0d2..043ef502092 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -382,7 +382,7 @@ if (empty($reshook)) { } // Mark as Read - if ($action == "mark_ticket_read" && $permissiontoadd) { + if ($action == "set_read" && $permissiontoadd) { $object->fetch('', '', GETPOST("track_id", 'alpha')); if ($object->markAsRead($user) > 0) { diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index c566bf54329..8df8af2ba68 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -417,9 +417,9 @@ class ActionsTicket print '
'; if ($status == 1) { - $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=mark_ticket_read'; // To set as read, we use a dedicated action + $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=set_read&token='.newToken(); // To set as read, we use a dedicated action } else { - $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=confirm_set_status&token='.newToken().'&new_status='.$status; + $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=confirm_set_status&token='.newToken().'&new_status='.((int) $status); } print ''; From 20134d0f1b01f367c99e1d62b363ec7f5b432ac4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jul 2023 21:52:58 +0200 Subject: [PATCH 04/47] Debug v18 --- htdocs/contact/class/contact.class.php | 7 +++++-- htdocs/contact/list.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 3a4128f01cf..4fbdf3f096b 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1552,8 +1552,11 @@ class Contact extends CommonObject if ($withpicto) { if ($withpicto < 0) { $result .= ''.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).''; + if ($withpicto != 2 && $withpicto != -2) { + $result .= ' '; + } } else { - $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"'), 0, 0, $notooltip ? 0 : 1); + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="pictofixedwidth"' : '') : 'class="'.(($withpicto != 2) ? 'pictofixedwidth ' : '').'"'), 0, 0, $notooltip ? 0 : 1); } } if ($withpicto != 2 && $withpicto != -2) { @@ -2210,7 +2213,7 @@ class Contact extends CommonObject $return .= ''; if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) { - $return .= '
'.$this->thirdparty->getNomUrl(1).'
'; + $return .= '
'.$this->thirdparty->getNomUrl(1).'
'; } /*if (property_exists($this, 'phone_pro') && !empty($this->phone_pro)) { $return .= '
'.img_picto($langs->trans("Phone"), 'phone'); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 40ea623911e..d3564774f61 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -1347,7 +1347,7 @@ while ($i < $imaxinloop) { // (Last) Name if (!empty($arrayfields['p.lastname']['checked'])) { print ''; - print $contactstatic->getNomUrl(1); + print $contactstatic->getNomUrl(-1); print ''; if (!$i) { $totalarray['nbfield']++; From 72a6e54f02818f66abdccd1afa1376960c3057bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jul 2023 21:43:36 +0200 Subject: [PATCH 05/47] Fix debug v18 --- htdocs/website/index.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 09073cc0c68..c3f4178b7a1 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2921,7 +2921,7 @@ if (!GETPOST('hide_websitemenu')) { print ''; // Do not use ajax, we need a refresh of full page when we change status of a website //print '
'; - //print ajax_object_onoff($object, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle', 'statuswebsite'); + //print ajax_object_onoff($object, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle inline-block', 'statuswebsite'); //print '
'; if ($website->status == $website::STATUS_DRAFT) { $text_off = 'Offline'; @@ -3097,7 +3097,7 @@ if (!GETPOST('hide_websitemenu')) { print '
'; // Close current websitebar to open a new one print ''; - print '
'; + print '
'; print '
'; print $langs->trans("PageContainer").': '; @@ -3147,7 +3147,7 @@ if (!GETPOST('hide_websitemenu')) { print ''.img_picto($langs->trans($text_off), 'switch_on').''; } } else { - print ajax_object_onoff($websitepage, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle'.(empty($websitepage->id) ? ' opacitymedium disabled' : ''), 'statuswebsitepage'); + print ajax_object_onoff($websitepage, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle inline-block'.(empty($websitepage->id) ? ' opacitymedium disabled' : ''), 'statuswebsitepage'); } //print '
'; print ''; @@ -3369,6 +3369,7 @@ if (!GETPOST('hide_websitemenu')) { print '
'; // Set page as homepage + print ''; if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) { //$disabled=' disabled="disabled"'; //print ''; @@ -3392,6 +3393,7 @@ if (!GETPOST('hide_websitemenu')) { $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website } print '
'.img_picto('', 'delete', 'class=""').''.$langs->trans("Delete").''; + print ''; } } @@ -4789,7 +4791,7 @@ if ($mode == 'replacesite' || $massaction == 'replace') { print ''.img_picto($langs->trans("EditHTMLSource"), 'edit').''; print ''; - print ajax_object_onoff($answerrecord, 'status', 'status', 'Enabled', 'Disabled', array(), 'valignmiddle'); + print ajax_object_onoff($answerrecord, 'status', 'status', 'Enabled', 'Disabled', array(), 'valignmiddle inline-block'); print ''; From ddaa32d67b02370447c4ea5ef0891427b0b01955 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jul 2023 21:58:47 +0200 Subject: [PATCH 06/47] Debug v18 --- htdocs/modulebuilder/index.php | 12 ++++++------ htdocs/mrp/mo_list.php | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 4bc7deca258..2d8a5483035 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -3332,7 +3332,7 @@ if ($module == 'initmodule') { } $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=objects&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabobj='.$objectname; - $head3[$h][1] = img_picto('', $pictoname, 'class="pictofixedwidth"').$objectname; + $head3[$h][1] = img_picto('', $pictoname, 'class="pictofixedwidth valignmiddle"').$objectname; $head3[$h][2] = $objectname; $h++; } @@ -3562,7 +3562,7 @@ if ($module == 'initmodule') { //print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; } elseif (!empty($tmpobject)) { - print ' '.$langs->trans("Image").' : '.img_picto('', $tmpobject->picto, 'class="pictofixedwidth"').$tmpobject->picto; + print ' '.$langs->trans("Image").' : '.img_picto('', $tmpobject->picto, 'class="pictofixedwidth valignmiddle"').$tmpobject->picto; print '
'; } @@ -3777,10 +3777,10 @@ if ($module == 'initmodule') { print ''; print ''; print ''; - print ''; + print ''; print ''; //print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -4800,7 +4800,7 @@ if ($module == 'initmodule') { function updateInputField() { value1 = $("#crud").val(); value2 = $("#permissionObj").val(); - + // Vérifie si les deux sélections sont faites if ($("#label").val() == "" && value1 && value2) { switch(value1.toLowerCase()){ @@ -4818,7 +4818,7 @@ if ($module == 'initmodule') { } } } - + $("#crud, #permissionObj").change(updateInputField); updateInputField(); '; diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index 30e3b55e0ce..0bd797f908a 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -551,6 +551,7 @@ print ''; // Action column if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; + $totalarray['nbfield']++; } foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); From d34e71877088509c659d042332e616085a5f55d2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 31 Jul 2023 22:40:17 +0200 Subject: [PATCH 07/47] Debug v18 --- htdocs/modulebuilder/index.php | 39 +++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 2d8a5483035..edead052752 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -4649,6 +4649,7 @@ if ($module == 'initmodule') { } if ($action != 'editfile' || empty($file)) { + print ''."\n"; print ''; $htmlhelp = $langs->trans("PermissionsDefDescTooltip", '{s1}'); $htmlhelp = str_replace('{s1}', ''.$langs->trans('DefaultRights').'', $htmlhelp); @@ -4675,24 +4676,17 @@ if ($module == 'initmodule') { print ''; print_liste_field_titre("ID", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, "center"); - print_liste_field_titre("CRUD", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, "center"); print_liste_field_titre("Object", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, "center"); + print_liste_field_titre("CRUD", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, "center"); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, "center"); print_liste_field_titre("", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, "center"); print "\n"; //form for add new right print ''; - print ''; + print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; @@ -4726,7 +4727,6 @@ if ($module == 'initmodule') { print ''; print ''; - print ''; print ''; @@ -4761,6 +4761,7 @@ if ($module == 'initmodule') { print ''; print ''; } else { + // $perm can be module->object->crud or module->crud print ''; print ''; @@ -4768,11 +4769,19 @@ if ($module == 'initmodule') { print ''; print ''; - print ($perm[5] == 'write' ? $langs->trans($crud['write']): ucfirst($langs->trans($perm[5]))); + if (in_array($perm[5], array('lire', 'read', 'creer', 'write', 'effacer', 'delete'))) { + print dol_escape_htmltag(ucfirst($perm[4])); + } else { + print ''; // No particular object + } print ''; print ''; - print dol_escape_htmltag(ucfirst($perm[4])); + if (in_array($perm[5], array('lire', 'read', 'creer', 'write', 'effacer', 'delete'))) { + print ucfirst($langs->trans($perm[5])); + } else { + print ucfirst($langs->trans($perm[4])); + } print ''; print ''; @@ -5624,7 +5633,7 @@ if ($module == 'initmodule') { print ''; } } else { - print ''.$langs->trans("None").''; + print ''.$langs->trans("None").''; } print ''; From 280ed8ef830e2c52f1e7279d6a140e1438c77c5f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 11:52:22 +0200 Subject: [PATCH 08/47] Update the SECURITY.md file --- SECURITY.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 02f3c4968dd..6467eb74e09 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -39,7 +39,9 @@ We are happy to thank everyone who submits valid reports which help us improve t You must be the first reporter of the vulnerability (duplicate reports are closed). -You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary. +You must : +- Send your report on https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US (recommended) +- Or send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary, to security@dolibarr.org You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform. From cef58c11dad6215b6e09756491c8a5555e1faeb6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 11:55:06 +0200 Subject: [PATCH 09/47] Uodate security --- SECURITY.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SECURITY.md b/SECURITY.md index 6467eb74e09..d69099e6f18 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -47,6 +47,8 @@ You must avoid tests that could cause degradation or interruption of our service You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability. +Reports are processed around once a month. + ## Scope for qualified vulnerabilities ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid": From d17a88834e5f96e0b550ddcbec3eb76e49dfe36c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 12:13:03 +0200 Subject: [PATCH 10/47] Update security.md --- SECURITY.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index d69099e6f18..d274be558bb 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,8 +12,12 @@ This file contains some policies about the security reports on Dolibarr ERP CRM ## Reporting a Vulnerability -To report a vulnerability, for a private report, please use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) (if you have permissions). -Alternatively send an email to security@dolibarr.org (for everybody) + +To report a vulnerability, for a private report, you can: + +- Send your report on https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US (recommended for everybody) +- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) +- Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary ## Hunting vulnerabilities on Dolibarr @@ -39,10 +43,6 @@ We are happy to thank everyone who submits valid reports which help us improve t You must be the first reporter of the vulnerability (duplicate reports are closed). -You must : -- Send your report on https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US (recommended) -- Or send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary, to security@dolibarr.org - You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform. You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability. From 1a039e04a866741ed2a16a4975e0f92a7250a4e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 12:13:43 +0200 Subject: [PATCH 11/47] Update link to report a vulnerability --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index d274be558bb..b8e47f72013 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -15,7 +15,7 @@ This file contains some policies about the security reports on Dolibarr ERP CRM To report a vulnerability, for a private report, you can: -- Send your report on https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US (recommended for everybody) +- Send your report on [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody) - Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) - Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary From 014b4d21eaf2392b3ac97a64f021857780141014 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 13:04:31 +0200 Subject: [PATCH 12/47] Update security --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index b8e47f72013..91913db0b43 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,7 +7,7 @@ This file contains some policies about the security reports on Dolibarr ERP CRM | Version | Supported | | ---------- | ---------------------- | | <= 17.0.0 | :x: | -| >= 17.0.1 | :white_check_mark: | +| >= 17.0.3 | :white_check_mark: | | >= develop | :white_check_mark: | ## Reporting a Vulnerability From 812997f1279b370caf199c9a6c27aaab248a535d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 13:05:50 +0200 Subject: [PATCH 13/47] Update security --- SECURITY.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 02f3c4968dd..91913db0b43 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,13 +7,17 @@ This file contains some policies about the security reports on Dolibarr ERP CRM | Version | Supported | | ---------- | ---------------------- | | <= 17.0.0 | :x: | -| >= 17.0.1 | :white_check_mark: | +| >= 17.0.3 | :white_check_mark: | | >= develop | :white_check_mark: | ## Reporting a Vulnerability -To report a vulnerability, for a private report, please use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) (if you have permissions). -Alternatively send an email to security@dolibarr.org (for everybody) + +To report a vulnerability, for a private report, you can: + +- Send your report on [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody) +- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) +- Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary ## Hunting vulnerabilities on Dolibarr @@ -39,12 +43,12 @@ We are happy to thank everyone who submits valid reports which help us improve t You must be the first reporter of the vulnerability (duplicate reports are closed). -You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary. - You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform. You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability. +Reports are processed around once a month. + ## Scope for qualified vulnerabilities ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid": From 3d65f576acb659ee77ea8efafa673977f1666501 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 13:12:08 +0200 Subject: [PATCH 14/47] Fix security --- SECURITY.md | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index b121b606180..6d768c4e0a8 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,16 +4,15 @@ This file contains some policies about the security reports on Dolibarr ERP CRM ## Supported Versions for security reports -| Version | Supported | -| ---------- | ---------------------- | -| <= 16.0.2 | :x: | -| >= 16.0.3 | :white_check_mark: | -| >= develop | :white_check_mark: | +Security report are valid only on current stable version (see dolibarr.org web site to get current stable version) or on development version (branch "develop" on https://github.com/Dolibarr/dolibarr). ## Reporting a Vulnerability -To report a vulnerability, for a private report, please use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) (if you have permissions). -Alternatively send an email to security@dolibarr.org (for everybody) +To report a vulnerability, for a private report, you can: + +- Send your report on [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody) +- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) +- Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary ## Hunting vulnerabilities on Dolibarr @@ -39,12 +38,12 @@ We are happy to thank everyone who submits valid reports which help us improve t You must be the first reporter of the vulnerability (duplicate reports are closed). -You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary. - You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform. You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability. +Reports are processed around once a month. + ## Scope for qualified vulnerabilities ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid": @@ -53,32 +52,33 @@ ONLY vulnerabilities discovered, when the following setup on test platform is us * $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value) * $dolibarr_main_force_https must be set to something else than 0. * The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default) -* The module DebugBar and ModuleBuilder must NOT be enabled (by default, these modules are not enabled. They are developer tools) * ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities). * The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer). * The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only. * CSRF attacks are accepted but double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3. +* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools) * Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user. +* Fail2ban rules for rate limit on the login page,password forgotten page, api calls and all public pages (/public/*) must be installed as recommendend into the section "About - Admin tools - Section Access limits and mitigation". Scope is the web application (back office) and the APIs. -## Qualifying vulnerabilities for reporting +## Examples of vulnerabilities that are Qualified for reporting. * Remote code execution (RCE) * Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA) -* Code injections (HTML, JS, SQL, PHP, ...) +* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose). * Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except into module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too). * Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users) * Open redirect * Broken authentication & session management -* Insecure direct object references -* CORS with real security impact +* Insecure direct object references (IDOR) +* Cross-Origin Resource Sharing (CORS) with real security impact * Horizontal and vertical privilege escalation * "HTTP Host Header" XSS * Software version disclosure (for non admin users only) * Stack traces or path disclosure (for non admin users only) -## Non-qualifying vulnerabilities for reporting +## Examples of vulnerabilities that are Non-qualified for reporting. * "Self" XSS * SSL/TLS best practices @@ -92,6 +92,7 @@ Scope is the web application (back office) and the APIs. * Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated * Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC) * Reports on features flagged as "experimental" or "development" -* Software version or private IP disclosure when logged user is admin -* Stack traces or path disclosure when logged user is admin +* Software version or private IP disclosure when logged-in user is admin +* Stack traces or path disclosure when logged-in user is admin * Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities". +* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the fail2ban recommended fail2ban rules were not installed. From b88c9307d72a112f54fdd7ef37a4e136990a543a Mon Sep 17 00:00:00 2001 From: lamrani abdelwadoud Date: Tue, 1 Aug 2023 13:40:08 +0200 Subject: [PATCH 15/47] New for sorting fields on leave balances #18011 (#25526) * product_card problem unexpected tocken * add field employees for sort and select for hide & show fields * button show & hide * fix conflit * fix conflit * fix conflit --- htdocs/holiday/define_holiday.php | 151 ++++++++++++++++++------------ 1 file changed, 90 insertions(+), 61 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 6ff31497a57..a95b8739768 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -85,6 +85,12 @@ if (empty($user->rights->holiday->read)) { accessforbidden(); } +$arrayfields = array( + 'cp.rowid'=>array('label'=>$langs->trans("Employee"), 'checked'=>1, 'position'=>20), + 'cp.fk_user'=>array('label'=>$langs->trans("Supervisor"), 'checked'=>1, 'position'=>30), + 'cp.nbHoliday'=>array('label'=>$langs->trans("NbHolidays"), 'checked'=>1, 'position'=>40), + 'cp.note_public'=>array('label'=>$langs->trans("Note"), 'checked'=>1, 'position'=>50), +); /* * Actions @@ -286,8 +292,8 @@ if (empty($user->rights->holiday->readall)) { $userchilds = $user->getAllChildIds(1); $filters .= ' AND u.rowid IN ('.$db->sanitize(join(', ', $userchilds)).')'; } -if (!empty($search_name)) { - $filters .= natural_search(array('u.firstname', 'u.lastname'), $search_name); +if ($search_name > 0) { + $filters .= natural_search(array('u.rowid'), $search_name, 2); } if ($search_supervisor > 0) { $filters .= natural_search(array('u.fk_user'), $search_supervisor, 2); @@ -302,6 +308,7 @@ if (is_numeric($listUsers) && $listUsers < 0) { $i = 0; + if (count($typeleaves) == 0) { //print '
'; print $langs->trans("NoLeaveWithCounterDefined")."
\n"; @@ -315,31 +322,44 @@ if (count($typeleaves) == 0) { $moreforfilter = ''; + $selectedfields = ''; + if ($massactionbutton) { + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields .= ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + } + print '
'; print ''."\n"; print ''; // User - print ''; - + if (!empty($arrayfields['cp.rowid']['checked'])) { + print ''; + } // Supervisor - print ''; - + if (!empty($arrayfields['cp.fk_user']['checked'])) { + print ''; + } // Type of leave request - if (count($typeleaves)) { - foreach ($typeleaves as $key => $val) { - print ''; + if (!empty($arrayfields['cp.nbHoliday']['checked'])) { + if (count($typeleaves)) { + foreach ($typeleaves as $key => $val) { + print ''; + } + } else { + print ''; } - } else { + } + if (!empty($arrayfields['cp.note_public']['checked'])) { print ''; } print ''; - print ''; // Action column print ''; print ''; - print_liste_field_titre('Employee', $_SERVER["PHP_SELF"]); - print_liste_field_titre('Supervisor', $_SERVER["PHP_SELF"]); - if (count($typeleaves)) { - foreach ($typeleaves as $key => $val) { - $labeltype = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']); - print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center '); + if (!empty($arrayfields['cp.rowid']['checked'])) { + print_liste_field_titre('Employee', $_SERVER["PHP_SELF"]); + } + if (!empty($arrayfields['cp.fk_user']['checked'])) { + print_liste_field_titre('Supervisor', $_SERVER["PHP_SELF"]); + } + if (!empty($arrayfields['cp.nbHoliday']['checked'])) { + if (count($typeleaves)) { + foreach ($typeleaves as $key => $val) { + $labeltype = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']); + print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center '); + } + } else { + print_liste_field_titre('NoLeaveWithCounterDefined', $_SERVER["PHP_SELF"], '', '', '', ''); } - } else { - print_liste_field_titre('NoLeaveWithCounterDefined', $_SERVER["PHP_SELF"], '', '', '', ''); } - print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]); + if (!empty($arrayfields['cp.note_public']['checked'])) { + print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]); + } print_liste_field_titre(''); + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; - $selectedfields = ''; - if ($massactionbutton) { - $selectedfields = $form->showCheckAddButtons('checkforselect', 1); - } - - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); - print ''; + print ''; $usersupervisor = new User($db); foreach ($listUsers as $users) { @@ -399,46 +422,52 @@ if (count($typeleaves) == 0) { print ''; // User - print ''; - - // Supervisor - print ''; + } + // Supervisor + if (!empty($arrayfields['cp.fk_user']['checked'])) { + print ''; } - print ''; // Amount for each type - if (count($typeleaves)) { - foreach ($typeleaves as $key => $val) { - $nbtoshow = ''; - if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') { - $nbtoshow = price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5); - } + if (!empty($arrayfields['cp.nbHoliday']['checked'])) { + if (count($typeleaves)) { + foreach ($typeleaves as $key => $val) { + $nbtoshow = ''; + if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') { + $nbtoshow = price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5); + } - //var_dump($users['rowid'].' - '.$val['rowid']); - print ''."\n"; } - //print ' '.$langs->trans('days'); - print ''."\n"; + } else { + print ''; } - } else { - print ''; } // Note - print ''; } - print ''; - // Button modify print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } + // User if (!empty($arrayfields['cp.rowid']['checked'])) { print ''; } // Supervisor @@ -362,14 +371,20 @@ if (count($typeleaves) == 0) { print ''; // Action column - print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } print ''; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; + } if (!empty($arrayfields['cp.rowid']['checked'])) { print_liste_field_titre('Employee', $_SERVER["PHP_SELF"]); } @@ -390,10 +405,11 @@ if (count($typeleaves) == 0) { print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]); } print_liste_field_titre(''); - print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; - - - print ''; + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; + } + print ''; $usersupervisor = new User($db); foreach ($listUsers as $users) { @@ -421,6 +437,20 @@ if (count($typeleaves) == 0) { print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } + // User if (!empty($arrayfields['cp.rowid']['checked'])) { print ''; } + // Button modify print ''."\n"; - print ''; } - print ''; + print ''; $i++; } + if (count($listUsers) <= 0) { + $colspan = 2; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + if ($key == 'cp.nbHoliday') { + foreach ($typeleaves as $key => $val) { + $colspan++; + } + } else { + $colspan++; + } + } + } + print ''; + } + print '
'; - print ''; - print ''; + print $form->select_dolusers($search_name, 'search_name', 1, null, 0, null, null, 0, 0, 0, '', 0, '', 'maxwidth150'); + print ''; - print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, null, 0, null, null, 0, 0, 0, '', 0, '', 'maxwidth150'); - print ''; + print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, null, 0, null, null, 0, 0, 0, '', 0, '', 'maxwidth150'); + print ''; @@ -350,27 +370,30 @@ if (count($typeleaves) == 0) { print '
'; - print $userstatic->getNomUrl(-1); - print ''; - if ($userstatic->fk_user > 0) { - print $usersupervisor->getNomUrl(-1); + if (!empty($arrayfields['cp.rowid']['checked'])) { + print ''; + print $userstatic->getNomUrl(-1); + print ''; + if ($userstatic->fk_user > 0) { + print $usersupervisor->getNomUrl(-1); + } + print ''; - if ($canedit) { - print ''; - } else { - print $nbtoshow; + //var_dump($users['rowid'].' - '.$val['rowid']); + print ''; + if ($canedit) { + print ''; + } else { + print $nbtoshow; + } + //print ' '.$langs->trans('days'); + print ''; - if ($canedit) { - print ''; + if (!empty($arrayfields['cp.note_public']['checked'])) { + print ''; + if ($canedit) { + print ''; + } + print ''; if (!empty($user->rights->holiday->define_holiday)) { // Allowed to set the balance of any user From 9482ae5215e2447d67a9b7ded9c12316d78fc24d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 13:50:58 +0200 Subject: [PATCH 16/47] Debug sort filter --- htdocs/holiday/define_holiday.php | 88 ++++++++++++++++++++++++------- 1 file changed, 70 insertions(+), 18 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index a95b8739768..0e7818f6168 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -92,6 +92,7 @@ $arrayfields = array( 'cp.note_public'=>array('label'=>$langs->trans("Note"), 'checked'=>1, 'position'=>50), ); + /* * Actions */ @@ -292,8 +293,8 @@ if (empty($user->rights->holiday->readall)) { $userchilds = $user->getAllChildIds(1); $filters .= ' AND u.rowid IN ('.$db->sanitize(join(', ', $userchilds)).')'; } -if ($search_name > 0) { - $filters .= natural_search(array('u.rowid'), $search_name, 2); +if (!empty($search_name)) { + $filters .= natural_search(array('u.firstname', 'u.lastname'), $search_name); } if ($search_supervisor > 0) { $filters .= natural_search(array('u.fk_user'), $search_supervisor, 2); @@ -334,10 +335,18 @@ if (count($typeleaves) == 0) { print '
'; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; - print $form->select_dolusers($search_name, 'search_name', 1, null, 0, null, null, 0, 0, 0, '', 0, '', 'maxwidth150'); + print ''; print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print '
'; + + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($userstatic->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''; @@ -468,27 +498,49 @@ if (count($typeleaves) == 0) { } print ''; if (!empty($user->rights->holiday->define_holiday)) { // Allowed to set the balance of any user print ''; } print ''; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($userstatic->id, $arrayofselected)) { - $selected = 1; + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($userstatic->id, $arrayofselected)) { + $selected = 1; + } + print ''; } - print ''; + print '
'.$langs->trans("NoRecordFound").'
'; print '
'; } From 6ddee8861523a67e33bc3247eae7e2d12db4d4b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 13:55:33 +0200 Subject: [PATCH 17/47] FIX Duplicate warning message --- htdocs/holiday/define_holiday.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 0e7818f6168..70692286b0a 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -164,8 +164,6 @@ if (empty($reshook)) { if ($result < 0) { setEventMessages($holiday->error, $holiday->errors, 'errors'); $error++; - } elseif ($result == 0) { - setEventMessages($langs->trans("HolidayQtyNotModified", $user->login), null, 'warnings'); } // Update of the days of the employee @@ -191,6 +189,10 @@ if (empty($reshook)) { } } + if (!$error && !$nbok) { + setEventMessages($langs->trans("HolidayQtyNotModified", $user->login), null, 'warnings'); + } + if (!$error) { $db->commit(); From 3d8f14e78dc8a02d9243a2bf39a256f6570a5c54 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Aug 2023 14:14:54 +0200 Subject: [PATCH 18/47] Debug v19 --- htdocs/core/class/html.formother.class.php | 2 +- htdocs/holiday/define_holiday.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 898addd42ba..088d95f218f 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -850,7 +850,7 @@ class FormOther if (!is_array($arrayofcolors) || count($arrayofcolors) < 1) { // Case of selection of any color $langs->load("other"); - if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && getDolGlobalInt('MAIN_USE_HTML5_COLOR_SELECTOR')) { + if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !getDolGlobalInt('MAIN_USE_HTML5_COLOR_SELECTOR')) { $out .= ''; $out .= ''; $out .= '