mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-01-20 10:52:15 +01:00
Don't query twice.
This commit is contained in:
parent
52720a57ba
commit
77fe1df52e
@ -85,13 +85,13 @@ $ad = getAuthData($conn, $devId);
|
|||||||
if (!is_array($ad)) {
|
if (!is_array($ad)) {
|
||||||
debug('Discovered Yubikey ' . $devId);
|
debug('Discovered Yubikey ' . $devId);
|
||||||
addNewKey($conn, $devId);
|
addNewKey($conn, $devId);
|
||||||
}
|
|
||||||
$ad = getAuthData($conn, $devId);
|
$ad = getAuthData($conn, $devId);
|
||||||
if (!is_array($ad)) {
|
if (!is_array($ad)) {
|
||||||
debug('Invalid Yubikey ' . $devId);
|
debug('Invalid Yubikey ' . $devId);
|
||||||
sendResp(S_BAD_OTP);
|
sendResp(S_BAD_OTP);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
debug($ad);
|
debug($ad);
|
||||||
if ($ad['active'] != 1) {
|
if ($ad['active'] != 1) {
|
||||||
debug('De-activated Yubikey ' . $devId);
|
debug('De-activated Yubikey ' . $devId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user