From dc7ff07517ce9d165afed9e74f876bc684ea4042 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 20 Jul 2021 23:54:22 +0200 Subject: [PATCH] Fix #huntr7144bb4b-338f-45f0-a70e-088ef1f4c037 --- htdocs/langs/en_US/main.lang | 3 ++- htdocs/main.inc.php | 14 +++++++++----- htdocs/user/card.php | 4 ++-- htdocs/user/group/perms.php | 12 ++++++------ 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 94c851bf346..ddd60a9b68e 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1137,4 +1137,5 @@ CopiedToClipboard=Copied to clipboard InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. ConfirmCancel=Are you sure you want to cancel EmailMsgID=Email MsgID -Forthcoming=Forthcoming \ No newline at end of file +Forthcoming=Forthcoming +Currently=Currently \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 4dff3426ac9..2bd95197a2a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -460,11 +460,15 @@ if (!defined('NOTOKENRENEWAL')) { if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)) || defined('CSRFCHECK_WITH_TOKEN')) { // Array of action code where CSRFCHECK with token will be forced (so token must be provided on url request) $arrayofactiontoforcetokencheck = array( - 'activate', 'add', 'addtimespent', 'update', 'install', - 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_purge', 'confirm_reject_check', 'confirm_deletedir', - 'delete', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'disable', - 'doprev', 'donext', 'dvprev', 'dvnext', - 'enable', 'setpricelevel' + 'activate', 'add', 'addrights', 'addtimespent', + 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_purge', 'confirm_reject_check', 'confirm_deletedir', + 'delete', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'delrights', + 'disable', + 'doprev', 'donext', 'dvprev', 'dvnext', + 'enable', + 'install', + 'setpricelevel', + 'update' ); $sensitiveget = false; if (in_array(GETPOST('action', 'aZ09'), $arrayofactiontoforcetokencheck)) { diff --git a/htdocs/user/card.php b/htdocs/user/card.php index c74a6fa729c..cb7aa69949c 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1437,7 +1437,7 @@ if ($action == 'create' || $action == 'adduserldap') { } // Employee - print ''.$langs->trans("Employee").''; + print ''.$langs->trans("Employee").''; print 'employee ? ' checked="checked"' : '').'>'; //print yn($object->employee); print ''."\n"; @@ -1803,7 +1803,7 @@ if ($action == 'create' || $action == 'adduserldap') { print dol_print_date($object->datepreviouslogin, "dayhour").' ('.$langs->trans("Previous").'), '; } if ($object->datelastlogin) { - print dol_print_date($object->datelastlogin, "dayhour").' ('.$langs->trans("Current").')'; + print dol_print_date($object->datelastlogin, "dayhour").' ('.$langs->trans("Currently").')'; } print ''; print "\n"; diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 618d705bfcf..9fc4426ecac 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -235,9 +235,9 @@ if ($object->id > 0) { print ''.$langs->trans("Module").''; if ($caneditperms) { print ''; - print ''.$langs->trans("All").""; + print ''.$langs->trans("All").""; print '/'; - print ''.$langs->trans("None").""; + print ''.$langs->trans("None").""; print ''; } print ' '; @@ -286,9 +286,9 @@ if ($object->id > 0) { print ''; if ($caneditperms) { print ''; - print 'module.'">'.$langs->trans("All").""; + print 'module.'&token='.newToken().'">'.$langs->trans("All").""; print '/'; - print 'module.'">'.$langs->trans("None").""; + print 'module.'&token='.newToken().'">'.$langs->trans("None").""; print ''; } else { print ' '; @@ -326,7 +326,7 @@ if ($object->id > 0) { } else { // Do not own permission if ($caneditperms) { - print 'id.'">'; + print 'id.'&token='.newToken().'">'; //print img_edit_add($langs->trans("Add")); print img_picto($langs->trans("Add"), 'switch_off'); print ''; @@ -336,7 +336,7 @@ if ($object->id > 0) { } else { // Do not own permission if ($caneditperms) { - print 'id.'">'; + print 'id.'&token='.newToken().'">'; //print img_edit_add($langs->trans("Add")); print img_picto($langs->trans("Add"), 'switch_off'); print '';