1
0
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:
Simon Josefsson 2009-04-01 16:29:07 +00:00
parent 52720a57ba
commit 77fe1df52e

View File

@ -85,12 +85,12 @@ $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) {