Commit 82dcaeee authored by Imran Hussain's avatar Imran Hussain

Be more strict with doorkey checks

parent 032c9cfe
......@@ -39,11 +39,11 @@ curl_setopt($curlsso,CURLOPT_RETURNTRANSFER,TRUE);
$sso_result = json_decode(curl_exec($curlsso));
curl_close($curlsso);
if (!$sso_result->apistate === "ok") {
if (!$sso_result->apistate === "ok" || $sso_result->sucs_username === "") {
$sso_error = true;
}
if ($sso_result->sucs_username !== null) {
if ($sso_result->sucs_username !== null && $sso_result->sucs_username !== "") {
$not_logged_in = false;
$username = $sso_result->sucs_username;
}
......@@ -53,7 +53,7 @@ if ($not_logged_in === false && in_array($sso_result->sucs_username,$bannedUsers
//die("u r b&");
}
if ($_POST["unlock"] === "Unlock!" && !$outsider && !$banned) {
if ($_POST["unlock"] === "Unlock!" && !$outsider && !$banned && !$not_logged_in) {
include_once("../doorkey.php");
//curl door
$curl = curl_init();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment