From df9d424becfcc8063774115299d9504c9bf73fb3 Mon Sep 17 00:00:00 2001 From: Dany wm De Bontridder Date: Sun, 1 Nov 2020 13:04:51 +0100 Subject: [PATCH] Security Can_Request log the security for Ajax --- include/class/user.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/class/user.class.php b/include/class/user.class.php index 23051d0f7..6d43289b6 100644 --- a/include/class/user.class.php +++ b/include/class/user.class.php @@ -745,7 +745,7 @@ class User /**\brief Check if the user can access * otherwise warn and exit * \param $p_action requested action - * \param $p_js = 1 javascript, or 0 just a text + * \param $p_js = 1 javascript, or 0 just a text or 2 to log it silently * \return nothing the program exits automatically */ @@ -760,6 +760,9 @@ class User echo "alert ('Cette action ne vous est pas autorisée. Contactez votre responsable');"; echo ""; } + elseif ($p_js == 2) { + record_log(_("Access invalid").$p_action); + } else { echo '
';