add an explanation about the logged_in_user function
Hopefully it prevents users from introducing security vulnerabilities in their websites
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
SELECT 'redirect' AS component,
|
||||
'signin.sql?error' AS link
|
||||
WHERE logged_in_user(sqlpage.cookie('session')) IS NULL;
|
||||
-- logged_in_user is a custom postgres function defined in the first migration of this example
|
||||
-- that avoids having to repeat `(SELECT username FROM login_session WHERE id = session_id)` everywhere.
|
||||
|
||||
SELECT 'shell' AS component, 'Protected page' AS title, 'lock' AS icon, '/' AS link, 'logout' AS menu_item;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user