Skip to content

Commit

Permalink
There is a test in isPermitted() in CoreModule.php, if AUTHORISATION
Browse files Browse the repository at this point in the history
might be null, and $authorized is then set to false. However, later
AUTHORISATION is dereferenced unconditionally. Add a check to $authorized
before dereferencing AUTHORISATION.
  • Loading branch information
buzzdeee authored and LarsMichelsen committed Apr 16, 2018
1 parent d55e380 commit b7f82b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/server/core/classes/CoreModule.php
Expand Up @@ -117,7 +117,7 @@ public function isPermitted() {
// Maybe the requested action is summarized by some other
$action = !is_bool($this->aActions[$this->sAction]) ? $this->aActions[$this->sAction] : $this->sAction;

if(!$AUTHORISATION->isPermitted($this->sName, $action, $this->sObject))
if($authorized && !$AUTHORISATION->isPermitted($this->sName, $action, $this->sObject))
$authorized = false;

if(!$authorized)
Expand Down

0 comments on commit b7f82b7

Please sign in to comment.