1
0
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:
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)) {
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) {