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

Be more strict with doorkey checks

parent 032c9cfe
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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();