diff --git a/ChangeLog b/ChangeLog
index 3aa4f789f3f..584b7c1ee0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,9 +20,110 @@ Following changes may create regressions for some external modules, but were nec
* The deprecated method get_OutstandingBill has been removed. You can use getOutstandingBills() instead.
* The hook "moreFamily" must return payment into var "totalpayment" and no more "paiement" (english replace french).
* Removed deprecated method actioncomm->add(), use create() instead
-* If you develop your own emailing target selector and used parent::add_to_target(...), you must now use parent::addToTargets(...)
+* If you have developed your own emailing target selector and used parent::add_to_target(...), you must now use parent::addToTargets(...)
+
+***** ChangeLog for 10.0.2 compared to 10.0.1 *****
+
+FIX: #10460 compatibility with MariaDB 10.4
+FIX: #11401 Adherent unknown language key
+FIX: #11422 Can't edit his own events with standard rights
+FIX: #11427 require product class (fixes POST /supplierinvoices REST API endpoint)
+FIX: #11570
+FIX: #11591 FIX: #11592
+FIX: #11671 CVE-2019-15062
+FIX: #11672
+FIX: #11685
+FIX: #11702
+FIX: #11711
+FIX: #11720
+FIX: #11746 Unable to modify amount of insurance of a loan
+FIX: #11752
+FIX: #11789 FIX: #11790
+FIX: #11804 list of tickets from a customer card display ALL tickets
+FIX: #11834
+FIX: Add char $ and ; in sanitizing of filenames.
+FIX: Add comment before protected functions
+FIX: Add log and type of content in dolWebsiteOutput and
+FIX: Add repair.php option 'restore' to restore user picture after v10
+FIX: amount opened on thirdparty card dont care of credit note not converted
+FIX: Api of documents work with value 'thirdparty'
+FIX: author in message / ticket API
+FIX: avoid sql error if fk_project is empty during update
+FIX: avoid Warning: A non-numeric value encountered
+FIX: bad consistency in list of invoice for direct debit order.
+FIX: Bad error management in zip compress and web site export
+FIX: bad substitution for extrafields type checkbox
+FIX: better help message with multicompany
+FIX: calculation of $products_dispatched
+FIX: Can't add a new chart of account
+FIX: Can't delete a draft leave even if it should
+FIX: Can't save setup of mailman module
+FIX: column jabberid missing
+FIX: Confirmation of deletion
+FIX: Consistency in direct debit order lists.
+FIX: Content send before header warning
+FIX: credit note can be split
+FIX: credit note used on list
+FIX: Css was saved on wrong website.
+FIX: delivery extrafields
+FIX: Disabling a website does not put it offline
+FIX: display only stripe sources for customer
+FIX: display payment intent in stripe's charge list
+FIX: document list for products in API
+FIX: dol_thirdparty_id for stripe PI
+FIX: Do not show tooltip if tooltip is empty
+FIX: duplicate css tag, decrease padding-bottom for boxes in eldy theme
+FIX: duration when creating service
+FIX: EDB-ID:47370
+FIX: Enable web site
+FIX: error management when adding a property with type real
+FIX: Fatal situation if payment removed on expense report. Action
+FIX: filepath of generated documents doesn't handle products with special characters
+FIX: for MAIN_MAXTABS_IN_CARD = $i card
+FIX: gzip and bzip2 must use option -f
+FIX: It was possible to create cashfence without entering data.
+FIX: javascript error when using dol_use_jmobile=1
+FIX: logout redirect to takepos.php
+FIX: Look and feel v10
+FIX: Make protected all pfd models functions
+FIX: management of extrafields in modulebuilder
+FIX: Missing div for buttons in tax, loan, various payment modules
+FIX: missing include (dol_convert_file not found)
+FIX: Missing some replacements in website module
+FIX: missing test on permission on button to delete ledger record
+FIX: Missing the filter fields in export of expense report and leaves
+FIX: Missing ticket icon on md theme
+FIX: Missing transaction
+FIX: Mode smartphone was not triggered when there is too loo menu
+FIX: Must escape shell
+FIX: Must exclude logs and some dirs for compressed backup
+FIX: name and position of hook FIX: #11710
+FIX: Not showing MAIN_INVERT_SENDER_RECIPIENT when edit field
+FIX: Nowrap missing on amount in boxes
+FIX: Option to use ZipArchive instead of PclZip bugged with large files.
+FIX: order or proposals billed if both workflow conf activated
+FIX: permission check on API intervention
+FIX: phpcs
+FIX: placement function
+FIX: qty in invoice list on product's stats
+FIX: remove disabled product type from product list
+FIX: Return code of pdf_einstein.modules.php and proformat
+FIX: round for application fee in stripe
+FIX: Sens of the balance (Debit - Credit in accountancy not contrary)
+FIX: Several pb in export of documents
+FIX: SQL syntax error and CSRF check on vat reports
+FIX: takepos layout clear or focus search
+FIX: too many record in sql request. Whena criteria is a filter, we must
+FIX: Translation of month
+FIX: USEDOLIBARREDITOR not always set
+FIX: VAT number for Monaco (it uses FR)
+FIX: vulenrability in uploading file found by 美创科技安全实验室
+FIX: wrong display (and hidden input) for already dispatched quantity
+FIX: wrong parameters (same error in branch 9, 10, develop)
+FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES
+
***** ChangeLog for 10.0.1 compared to 10.0.0 *****
FIX: #10930
FIX: #10984
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index eb3e225c4d6..34133a7482e 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -2110,10 +2110,8 @@ class Adherent extends CommonObject
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
- $notooltip=0;
-
$result=''; $label='';
- $link=''; $linkstart=''; $linkend='';
+ $linkstart=''; $linkend='';
if (! empty($this->photo))
{
@@ -2146,7 +2144,7 @@ class Adherent extends CommonObject
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
}
- $link = '';
+ $linkstart.=$linkclose.'>';
$linkend='';
- $result.=$link;
+ $result.=$linkstart;
if ($withpictoimg) $result.='
';
- if ($total_projectlinesa_planned){
+ if ($total_projectlinesa_planned) {
print '';
print '
';
print ' ';
diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php
index 884ff4fc922..d959a660224 100644
--- a/htdocs/core/lib/tax.lib.php
+++ b/htdocs/core/lib/tax.lib.php
@@ -124,7 +124,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$invoicefieldref='ref';
}
- if ( strpos($type, 'localtax') === 0 ) {
+ if (strpos($type, 'localtax') === 0) {
$f_rate = $type . '_tx';
} else {
$f_rate = 'tva_tx';
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 16d3969652d..e2c70823f4b 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -61,7 +61,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* @var string Family
- * @see familyinfo
+ * @see $familyinfo
*
* Native values: 'crm', 'financial', 'hr', 'projects', 'products', 'ecm', 'technic', 'other'.
* Use familyinfo to declare a custom value.
@@ -70,7 +70,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* @var array Custom family informations
- * @see family
+ * @see $family
*
* e.g.:
* array(
@@ -259,26 +259,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
*/
public $core_enabled;
- /**
- * @var string Relative path to module style sheet
- * @deprecated
- * @see module_parts
- */
- public $style_sheet = '';
-
- /**
- * @var 0|1|2|3 Where to display the module in setup page
- * @deprecated @since 4.0.0
- * @see family
- * @see familyinfo
- *
- * 0: common
- * 1: interface
- * 2: others
- * 3: very specific
- */
- public $special;
-
/**
* @var string Name of image file used for this module
*
@@ -297,20 +277,20 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
- * @var string[] List of module class names that must be enabled if this module is enabled.
- *
- * e.g.: array('modAnotherModule', 'FR'=>'modYetAnotherModule')
+ * @var string[] List of module class names that must be enabled if this module is enabled. e.g.: array('modAnotherModule', 'FR'=>'modYetAnotherModule')
+ * @see $requiredby
*/
public $depends;
/**
- * @var int[] List of module ids to disable if this one is disabled.
+ * @var string[] List of module class names to disable if the module is disabled.
+ * @see $depends
*/
public $requiredby;
/**
* @var string[] List of module class names as string this module is in conflict with.
- * @see depends
+ * @see $depends
*/
public $conflictwith;
@@ -915,7 +895,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* Gives the last date of activation
*
- * @return timestamp|string Date of last activation
+ * @return int|string Date of last activation or '' if module was never activated
*/
public function getLastActivationDate()
{
diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php
index 472e77e1974..d34d43384d0 100644
--- a/htdocs/install/repair.php
+++ b/htdocs/install/repair.php
@@ -69,6 +69,7 @@ print '
'.$langs->trans("Repair").'
';
print 'Option standard (\'test\' or \'confirmed\') is '.(GETPOST('standard', 'alpha')?GETPOST('standard', 'alpha'):'undefined').' '."\n";
print 'Option restore_thirdparties_logos (\'test\' or \'confirmed\') is '.(GETPOST('restore_thirdparties_logos', 'alpha')?GETPOST('restore_thirdparties_logos', 'alpha'):'undefined').' '."\n";
+print 'Option restore_user_pictures (\'test\' or \'confirmed\') is '.(GETPOST('restore_user_pictures', 'alpha')?GETPOST('restore_user_pictures', 'alpha'):'undefined').' '."\n";
print 'Option clean_linked_elements (\'test\' or \'confirmed\') is '.(GETPOST('clean_linked_elements', 'alpha')?GETPOST('clean_linked_elements', 'alpha'):'undefined').' '."\n";
print 'Option clean_menus (\'test\' or \'confirmed\') is '.(GETPOST('clean_menus', 'alpha')?GETPOST('clean_menus', 'alpha'):'undefined').' '."\n";
print 'Option clean_orphelin_dir (\'test\' or \'confirmed\') is '.(GETPOST('clean_orphelin_dir', 'alpha')?GETPOST('clean_orphelin_dir', 'alpha'):'undefined').' '."\n";
@@ -492,70 +493,183 @@ if ($ok && GETPOST('restore_thirdparties_logos'))
$ext='';
print '
';
- //}
}
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index dccd53c597a..532fbf14cb7 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -96,8 +96,6 @@ LocalTax1IsNotUsedES= RE is not used
LocalTax2IsUsed=Use third tax
LocalTax2IsUsedES= IRPF is used
LocalTax2IsNotUsedES= IRPF is not used
-LocalTax1ES=RE
-LocalTax2ES=IRPF
WrongCustomerCode=Customer code invalid
WrongSupplierCode=Vendor code invalid
CustomerCodeModel=Customer code model
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 9183cbb5f00..014ca843236 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -360,7 +360,7 @@ if (! defined('NOTOKENRENEWAL'))
if ((! defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && ! empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN))
|| defined('CSRFCHECK_WITH_TOKEN')) // Check validity of token, only if option MAIN_SECURITY_CSRF_WITH_TOKEN enabled or if constant CSRFCHECK_WITH_TOKEN is set
{
- if ($_SERVER['REQUEST_METHOD'] == 'POST' && ! GETPOSTISSET('token')) // Note, offender can still send request by GET
+ if ($_SERVER['REQUEST_METHOD'] == 'POST' && ! GETPOSTISSET('token')) // Note: offender can still send request by GET
{
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided.");
print "Access by POST method refused by CSRF protection in main.inc.php. Token not provided.\n";
@@ -368,17 +368,14 @@ if ((! defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && ! empty($conf->
die;
}
- //if ($_SERVER['REQUEST_METHOD'] === 'POST') // This test must be after loading $_SESSION['token'].
- //{
if (GETPOSTISSET('token') && GETPOST('token', 'alpha') != $_SESSION['token'])
{
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused due to invalid token, so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING);
//print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers.
- if ($conf->global->MAIN_FEATURES_LEVEL>1) setEventMessages('Unset POST by CSRF protection in main.inc.php (POST was already done or was done by a not allowed web page).'." \n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings');
+ if ($conf->global->MAIN_FEATURES_LEVEL>1) setEventMessages('Unset POST by CSRF protection in main.inc.php (POST for this token was already done or was done by a not allowed web page with a wrong token).'." \n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings');
unset($_POST);
unset($_GET['confirm']);
}
- //}
}
// Disable modules (this must be after session_start and after conf has been loaded)
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index db37b15345b..4b6364ea3be 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -2249,12 +2249,19 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
function stripeTokenHandler(token) {
// Insert the token ID into the form so it gets submitted to the server
var form = document.getElementById('payment-form');
+
var hiddenInput = document.createElement('input');
hiddenInput.setAttribute('type', 'hidden');
hiddenInput.setAttribute('name', 'stripeToken');
hiddenInput.setAttribute('value', token.id);
form.appendChild(hiddenInput);
+ var hiddenInput2 = document.createElement('input');
+ hiddenInput2.setAttribute('type', 'hidden');
+ hiddenInput2.setAttribute('name', 'token');
+ hiddenInput2.setAttribute('value', '');
+ form.appendChild(hiddenInput2);
+
// Submit the form
jQuery('#buttontopay').hide();
jQuery('#hourglasstopay').show();
@@ -2266,12 +2273,19 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
function stripeSourceHandler(source) {
// Insert the source ID into the form so it gets submitted to the server
var form = document.getElementById('payment-form');
+
var hiddenInput = document.createElement('input');
hiddenInput.setAttribute('type', 'hidden');
hiddenInput.setAttribute('name', 'stripeSource');
hiddenInput.setAttribute('value', source.id);
form.appendChild(hiddenInput);
+ var hiddenInput2 = document.createElement('input');
+ hiddenInput2.setAttribute('type', 'hidden');
+ hiddenInput2.setAttribute('name', 'token');
+ hiddenInput2.setAttribute('value', '');
+ form.appendChild(hiddenInput2);
+
// Submit the form
jQuery('#buttontopay').hide();
jQuery('#hourglasstopay').show();