Some additional beautification
This commit is contained in:
parent
abbf501602
commit
6fd54df940
|
@ -152,7 +152,9 @@ class exAuth {
|
|||
if (!isset($aCommand[1])) {
|
||||
$this->writeLog("[exAuth] invalid isuser command, no username given");
|
||||
fwrite(STDOUT, pack("nn", 2, 0));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
// Now we check if the given user is valid
|
||||
$sUser = str_replace(array("%20", "(a)"), array(" ", "@"), $aCommand[1]);
|
||||
$this->writeDebugLog("[debug] checking isuser for ". $sUser."@".$aCommand[2]);
|
||||
|
@ -166,6 +168,7 @@ class exAuth {
|
|||
$r = q($sQuery);
|
||||
$found = dbm::is_result($r);
|
||||
}
|
||||
|
||||
if ($found) {
|
||||
// The user is okay
|
||||
$this->writeLog("[exAuth] valid user: ". $sUser);
|
||||
|
@ -176,7 +179,6 @@ class exAuth {
|
|||
fwrite(STDOUT, pack("nn", 2, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check remote user existance via HTTP(S)
|
||||
|
@ -218,7 +220,9 @@ class exAuth {
|
|||
if (sizeof($aCommand) != 4) {
|
||||
$this->writeLog("[exAuth] invalid auth command, data missing");
|
||||
fwrite(STDOUT, pack("nn", 2, 0));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
// We now check if the password match
|
||||
$sUser = str_replace(array("%20", "(a)"), array(" ", "@"), $aCommand[1]);
|
||||
$this->writeDebugLog("[debug] doing auth for ".$sUser."@".$aCommand[2]);
|
||||
|
@ -243,6 +247,7 @@ class exAuth {
|
|||
$Error = ($aCommand[3] != $oConfig[0]["v"]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($Error) {
|
||||
$this->writeLog("[exAuth] authentification failed for user ".$sUser."@". $aCommand[2]);
|
||||
fwrite(STDOUT, pack("nn", 2, 0));
|
||||
|
@ -251,7 +256,6 @@ class exAuth {
|
|||
fwrite(STDOUT, pack("nn", 2, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check remote credentials via HTTP(S)
|
||||
|
|
Loading…
Reference in a new issue