[SUCS Devel] [Git][sucssite/doorkey][master] Be more strict with doorkey checks

Imran Hussain imranh at sucs.org
Fri Nov 1 12:09:48 GMT 2019



Imran Hussain pushed to branch master at sucssite / doorkey


Commits:
82dcaeee by Imran Hussain at 2019-11-01T12:09:17Z
Be more strict with doorkey checks

- - - - -


1 changed file:

- public/index.php


Changes:

=====================================
public/index.php
=====================================
@@ -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();



View it on GitLab: https://projects.sucs.org/sucssite/doorkey/commit/82dcaeeeaebfa12e20ff8b66b0623bee1bcf7689

-- 
View it on GitLab: https://projects.sucs.org/sucssite/doorkey/commit/82dcaeeeaebfa12e20ff8b66b0623bee1bcf7689
You're receiving this email because of your account on projects.sucs.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20191101/86861b11/attachment.html>


More information about the Devel mailing list