Improve isManagerOf() error handling to prevent possible security bug

master
Skylar Ittner 6 years ago
parent c414dff049
commit bad43ff93f

@ -90,10 +90,10 @@ function isManagerOf($m, $e) {
$resp = json_decode($response->getBody(), TRUE);
if ($resp['status'] == "OK") {
return $resp['managerof'];
return $resp['managerof'] === true;
} else {
// this shouldn't happen, but in case it does just fake it.
return ["name" => $u, "username" => $u, "uid" => $u];
return false;
}
}

Loading…
Cancel
Save