noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 16/29: Security Can_Request log the security


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 16/29: Security Can_Request log the security for Ajax
Date: Wed, 4 Nov 2020 11:08:42 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit df9d424becfcc8063774115299d9504c9bf73fb3
Author: Dany wm De Bontridder <danydb@noalyss.eu>
AuthorDate: Sun Nov 1 13:04:51 2020 +0100

    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 23051d0..6d43289 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 "</script>";
                        }
+                       elseif ($p_js == 2) {
+                               record_log(_("Access invalid").$p_action);
+                       }
                        else
                        {
                                echo '<div class="redcontent">';



reply via email to

[Prev in Thread] Current Thread [Next in Thread]