* Fix can bypass permissions.

This commit is contained in:
chaideqing
2023-01-13 06:39:03 +00:00
parent aa2a622208
commit 971133f23d
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -230,6 +230,7 @@ class misc extends control
*/
public function captcha($sessionVar = 'captcha', $uuid = '')
{
if($sessionVar == 'user') die('The string user is not allowed to be defined as a session field.');
$obLevel = ob_get_level();
for($i = 0; $i < $obLevel; $i++) ob_end_clean();
+2 -1
View File
@@ -1199,7 +1199,8 @@ class userModel extends model
*/
public function isLogon()
{
return ($this->session->user and $this->session->user->account != 'guest');
$user = $this->session->user;
return ($user and !empty($user->account) and $user->account != 'guest');
}
/**