Fix CSRF token validation function
Security Fix: - Changed checkToken() to dolibarr_checkToken() - Uses the correct Dolibarr CSRF protection function - Fixes 'Call to undefined function checkToken()' error The form should now work properly with CSRF protection.
This commit is contained in:
parent
54d0ceaa03
commit
480d3c5deb
@ -47,7 +47,7 @@ $success = '';
|
|||||||
|
|
||||||
if ($action == 'create') {
|
if ($action == 'create') {
|
||||||
// Check CSRF token
|
// Check CSRF token
|
||||||
if (!checkToken()) {
|
if (!dolibarr_checkToken()) {
|
||||||
$error = $langs->trans("ErrorCSRFToken");
|
$error = $langs->trans("ErrorCSRFToken");
|
||||||
} elseif (!empty($start_date) && !empty($end_date)) {
|
} elseif (!empty($start_date) && !empty($end_date)) {
|
||||||
// Create the declaration with dates
|
// Create the declaration with dates
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user