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