diff --git a/SECURITY.md b/SECURITY.md index 953059e625f..f004cea7c86 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -82,18 +82,17 @@ Scope is the web application (backoffice) and the APIs. ## Examples of vulnerabilities that are Non-qualified for reporting. * "Self" XSS -* SSL/TLS best practices -* Denial of Service attacks * Clickjacking/UI redressing -* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device * Presence of autocomplete attribute on web forms -* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself. * Logout and other instances of low-severity Cross-Site Request Forgery -* Missing security-related HTTP headers which do not lead directly to a vulnerability * 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-in user is admin +* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production). +* Software or libraries versions 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 in 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. +* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself. +* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed. +* SSL/TLS best practices +* Denial of Service attacks +* 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 diff --git a/dev/examples/stripe/webhook_ipn_paymentintent_failed_sepa.txt b/dev/examples/stripe/webhook_ipn_paymentintent_failed_sepa.txt new file mode 100644 index 00000000000..d85bedd9528 --- /dev/null +++ b/dev/examples/stripe/webhook_ipn_paymentintent_failed_sepa.txt @@ -0,0 +1,124 @@ +{ + "id": "evt_123456789", + "object": "event", + "api_version": "2023-10-16", + "created": 1702053463, + "data": { + "object": { + "id": "pi_123456789", + "object": "payment_intent", + "amount": 60, + "amount_capturable": 0, + "amount_details": { + "tip": { + } + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_123456789_secret_123456789", + "confirmation_method": "automatic", + "created": 1702053448, + "currency": "eur", + "customer": "cus_123456789", + "description": "Stripe payment from makeStripeSepaRequest: DID=31262-INV=123-CUS=123 did=123 ref=FA2312-123", + "invoice": null, + "last_payment_error": { + "code": "", + "decline_code": "generic_decline", + "message": "The transaction can't be processed because your customer's account information is missing or incorrect. Collect a new mandate and ask your customer to provide their name and address exactly as it appears on their bank account. After this, you can attempt the transaction again.", + "payment_method": { + "id": "pm_123456789", + "object": "payment_method", + "billing_details": { + "address": { + "city": null, + "country": "FR", + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": "email@example.com", + "name": "Test example", + "phone": null + }, + "created": 1692688898, + "customer": "cus_123456789", + "livemode": false, + "metadata": { + "dol_version": "19.0.0-dev", + "dol_thirdparty_id": "123", + "ipaddress": "1.2.3.4", + "dol_id": "123", + "dol_type": "companypaymentmode", + "dol_entity": "1" + }, + "sepa_debit": { + "bank_code": "123", + "branch_code": "", + "country": "AT", + "fingerprint": "123456789", + "generated_from": { + "charge": null, + "setup_attempt": null + }, + "last4": "3202" + }, + "type": "sepa_debit" + }, + "type": "card_error" + }, + "latest_charge": "py_123456789", + "livemode": false, + "metadata": { + "dol_version": "19.0.0-beta", + "dol_thirdparty_id": "123", + "ipaddress": "1.2.3.4", + "dol_id": "123", + "dol_type": "facture", + "dol_entity": "1" + }, + "next_action": null, + "on_behalf_of": null, + "payment_method": null, + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + }, + "sepa_debit": { + } + }, + "payment_method_types": [ + "card", + "sepa_debit" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": "DID=123-", + "statement_descriptor_suffix": "DID=123-", + "status": "requires_payment_method", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 1, + "request": { + "id": null, + "idempotency_key": null + }, + "type": "payment_intent.payment_failed" +} diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 3920cd1ef54..aeb9dc2009f 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -263,6 +263,7 @@ if (isset($current_fiscal_period)) { 'label' => $langs->trans('DateEnd'), 'value' => $current_fiscal_period['date_end'] ); + $formconfirm = $form->formconfirm( $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'], $langs->trans('AccountancyClosureAccountingReversal'), diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 11590149cbb..2fac417ab8c 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $action = GETPOST('action', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'admincompany'; // To manage different context of search +$page_y = GETPOSTINT('page_y'); // Load translation files required by the page $langs->loadLangs(array('admin', 'companies', 'bills')); @@ -137,7 +138,8 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) dol_mkdir($dirforimage); } $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); - if ($result > 0) { + + if (is_numeric($result) && $result > 0) { $constant = "MAIN_INFO_SOCIETE_LOGO"; if ($varforimage == 'logo_squarred') { $constant = "MAIN_INFO_SOCIETE_LOGO_SQUARRED"; @@ -267,7 +269,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) } if ($action != 'updateedit' && !$error) { - header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"].($page_y ? '?page_y='.$page_y : '')); exit; } } @@ -426,6 +428,7 @@ if (!empty($conf->use_javascript_ajax)) { print '
'; print ''; print ''; +print ''; print ''; print ''."\n"; @@ -499,7 +502,7 @@ if (isModEnabled('barcode')) { print ''; + print ''; print ''; } @@ -518,6 +521,9 @@ if ($maxmin > 0) { print ''; print ''; if (!empty($mysoc->logo_small)) { + print '
'; + print ''.img_delete($langs->trans("Delete"), '', 'marginleftonly').''; + print '
'; if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { print '
'; print ''; @@ -531,9 +537,6 @@ if (!empty($mysoc->logo_small)) { print ''; print '
'; } - print '
'; - print ''.img_delete($langs->trans("Delete"), '', 'marginleftonly').''; - print '
'; } elseif (!empty($mysoc->logo)) { if (file_exists($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { print '
'; @@ -542,7 +545,7 @@ if (!empty($mysoc->logo_small)) { print ''; } else { print '
'; - print ''; + print ''; print '
'; } } @@ -560,6 +563,9 @@ if ($maxmin > 0) { print ''; print '
'; if (!empty($mysoc->logo_squarred_small)) { + print '
'; + print ''.img_delete($langs->trans("Delete"), '', 'marginleftonly').''; + print '
'; if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_small)) { print '
'; print ''; @@ -573,7 +579,6 @@ if (!empty($mysoc->logo_squarred_small)) { print ''; print '
'; } - print '
'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'
'; } elseif (!empty($mysoc->logo_squarred)) { if (file_exists($conf->mycompany->dir_output.'/logos/'.$mysoc->logo_squarred)) { print '
'; @@ -582,7 +587,7 @@ if (!empty($mysoc->logo_squarred_small)) { print ''; } else { print '
'; - print ''; + print ''; print '
'; } } @@ -596,8 +601,9 @@ print ''; print '
'.$langs->trans("CompanyInfo").'
'; print ''; print ''; - print '
'; +print $form->buttonsSaveCancel("Save", '', array(), false, 'reposition'); -print '
'; +print '

'; // IDs of the company (country-specific) @@ -765,6 +771,9 @@ print '