Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2025-12-16 15:04:44 +01:00
commit f9f4e3d890
7 changed files with 146 additions and 7 deletions

View file

@ -12,12 +12,12 @@ Security report are valid only on any current stable version for the last 5 majo
To report a vulnerability, for a private report, you can:
- Send your report on Vulnerability Disclosure Program (VDP): https://github.com/Dolibarr/dolibarr/issues or https://github.com/Dolibarr/dolibarr/security/advisories (recommended for everybody)
- Send your report as an issue on https://github.com/Dolibarr/dolibarr/issues or on GitHub Vulnerability Disclosure Program tool (VDP): https://github.com/Dolibarr/dolibarr/security/advisories (recommended for everybody)
<!--
- Send your report on Vulnerability Disclosure Program (VDP) [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 an email to security@dolibarr.org with 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.
- Or send an email to security@dolibarr.org with 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 (in such a case, the issue may be created by the developer that will fix the vulnerability or the Release Manager).
## Hunting vulnerabilities on Dolibarr
@ -114,3 +114,8 @@ Scope is the web application (backoffice) and the APIs.
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
* Vulnerabilities of type XSS exploited by using javascript into a website page of the website module or by using php code into a website page (being able to set javascript or php code is the expected behaviour in the website module), except if the user does not have the permission to edit page or php code.
## Be informed of a new vulnerability
You can get more information on how to be informed on a new vulnerability on the page https://wiki.dolibarr.org/index.php/Security_information

View file

@ -431,7 +431,7 @@ class Categorie extends CommonObject
'cat_fk' => (empty($this->MAP_CAT_FK[$mapCode]) ? $mapCode : $this->MAP_CAT_FK[$mapCode]),
'cat_table' => (empty($this->MAP_CAT_TABLE[$mapCode]) ? $mapCode : $this->MAP_CAT_TABLE[$mapCode]),
'obj_class' => (empty($this->MAP_OBJ_CLASS[$mapCode]) ? $mapCode : $this->MAP_OBJ_CLASS[$mapCode]),
'obj_table' => (empty($this->MAP_OBJ_TABLE[$mapCode]) ? $mapCode : $this->MAP_OBJ_TABLE[$mapCode])
'obj_table' => (empty($this->MAP_OBJ_TABLE[$mapCode]) ? $mapCode : $this->MAP_OBJ_TABLE[$mapCode]),
);
}
@ -469,7 +469,7 @@ class Categorie extends CommonObject
}
$sql = "SELECT rowid, fk_parent, entity, label, description, color, position, fk_soc, visible, type, ref_ext";
$sql .= ", date_creation, tms, fk_user_creat, fk_user_modif";
$sql .= ", date_creation, tms, fk_user_creat, fk_user_modif, import_key";
$sql .= " FROM ".MAIN_DB_PREFIX."categorie";
if ($id) {
$sql .= " WHERE rowid = ".((int) $id);
@ -502,8 +502,9 @@ class Categorie extends CommonObject
$this->date_modification = $this->db->jdate($res['tms']);
$this->user_creation_id = (int) $res['fk_user_creat'];
$this->user_modification_id = (int) $res['fk_user_modif'];
$this->import_key = $res['import_key'];
// Retrieve all extrafield
// Retrieve all extrafields
// fetch optionals attributes and labels
$this->fetch_optionals();

View file

@ -177,7 +177,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
//var_dump($key.' '.$value.' '.$object->fields[$key]['type'].' '.$object->fields[$key]['notnull']);
$object->$key = $value;
if (!empty($val['notnull']) && $val['notnull'] > 0 && $object->$key == '' && isset($val['default']) && $val['default'] == '(PROV)') {
if (!empty($val['notnull']) && $val['notnull'] > 0 && $object->$key == '' && isset($val['default']) && $val['default'] === '(PROV)') {
$object->$key = '(PROV)';
}
if ($key == 'pass_crypted') {

View file

@ -94,7 +94,7 @@ class PricecyField extends CommonField
$out = self::$form->inputType('text', $htmlName, (string) $value, $htmlName, $moreCss, $moreAttrib . $autoFocus);
$out .= self::$form->selectCurrency($currency, $htmlName . 'currency_id');
return $out;
return '<span class="form-select-price-currency-container">'.$out.'</span>';
}
/**

View file

@ -0,0 +1,117 @@
:root{
--form-input-margin-bottom : calc(var(--form-element-spacing-vertical)*3);
}
/**
* STARS INPUT
*/
.star-selection {
font-size: 1rem;
cursor: pointer;
display: flex;
white-space: nowrap;
}
.star {
color: #ccc;
transition: color 0.4s;
}
.star:hover, .star.active {
color: var(--butactionbg);
}
/**
* SELECT 2
*/
.select2-container, .select2-container .selection, .select2-selection.select2-selection--single{
height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2) !important;
}
.select2.select2-container{
margin-bottom: var(--form-input-margin-bottom);
}
.select2-selection--single .select2-selection__rendered, .select2-selection__arrow{
line-height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2) !important;
height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2) !important;
}
.select2-selection--multiple .select2-selection__rendered{
line-height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) + var(--border-width) * 2) !important;
height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 3 + var(--border-width) * 2 ) !important;
}
.select2-search__field[type="search"] {
margin-bottom: 3px;
}
.select2-search.select2-search--dropdown{
border-bottom : 1px solid rgba(0,0,0,0.1);
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border :var(--border-width) solid var(--border-color) !important; /* fix select 2 to be compatible pico css */
}
.select2-container--default.select2-container--focus .select2-selection--multiple{
--border-color: var(--primary);
}
.select2-container .select2-selection--multiple .select2-selection__rendered {
display: block !important; /* fix select 2 to be compatible pico css */
overflow: auto;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
border: 0px solid #aaa !important; /* fix select 2 to be compatible pico css */
}
/**
* DATE
*/
[class*="fieldname_options_"] > input {
width: auto;
max-width: none;
box-sizing: border-box; /* pour que padding/border ne débordent pas */
}
[class*="fieldname_options_"] .nowraponall {
display: inline-flex;
align-items: center;
gap: 0.25rem;
}
[class*="fieldname_options_"] .dpInvisibleButtons{
display: inline-block;
width: auto;
vertical-align: baseline;
}
/**
* Inlines forms
*/
.nowraponall :is(input:not([type=checkbox], [type=radio]), select, textarea){
margin-bottom: 0;
}
.nowraponall:has(input:not([type=checkbox], [type=radio]), select, textarea){
margin-bottom: var(--form-input-margin-bottom);
}
/**
* Form currency
*/
.form-select-price-currency-container {
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
gap: 0.25rem;
margin-bottom: var(--form-input-margin-bottom);
}
.form-select-price-currency-container > input {
text-align: right;
}

View file

@ -102,6 +102,7 @@ if (empty($dolibarr_nocache)) {
@import "card.css";
@import "dialog.css";
@import "btn.css";
@import "form-input-special.css";
/**
This file can overwrite default pico css
*/

View file

@ -1670,4 +1670,19 @@ class FormWebPortal extends Form
return $html;
}
/**
* Retourne la liste des devises, dans la langue de l'utilisateur
*
* @param string $selected Preselected currency code
* @param string $htmlname Name of HTML select list
* @param int $mode 0 = Add currency symbol into label, 1 = Add 3 letter iso code, 2 = Add both symbol and code
* @param string $useempty '1'=Allow empty value
* @return string HTML component
*/
public function selectCurrency($selected = '', $htmlname = 'currency_id', $mode = 0, $useempty = '')
{
return '<span class="form-select-currency-container">'.parent::selectCurrency($selected, $htmlname, $mode, $useempty).'</span>';
}
}