From 710c1cef0849b8a881479c9e066fb74bd24781f8 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Sun, 20 Mar 2011 18:33:35 +0100 Subject: [PATCH] add check on new argument sess where if it isn't equal to FALSE is compared with User session field and return FALSE if differ --- web/Obj/brisk.phh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 7460da5..e41c252 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -895,7 +895,11 @@ class User { if ($shm = shm_attach($tok, $shm_sz)) { $user = @shm_get_var($shm, $tok); - log_only("bri == ".($user == FALSE ? "FALSE" : "TRUE")." bri === ".($user === FALSE ? "FALSE" : "TRUE")." bri isset ".(isset($user) ? "TRUE" : "FALSE")); + if ($sess != FALSE && $user->sess != $sess) { + $doexit = TRUE; + break; + } + log_only("user == ".($user == FALSE ? "FALSE" : "TRUE")." user === ".($user === FALSE ? "FALSE" : "TRUE")." user isset ".(isset($user) ? "TRUE" : "FALSE")); if (isset($user)) log_only("bri count ".count($user)); -- 2.17.1