mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-01-20 10:52:15 +01:00
Use -1 in yk_counter etc. to indicate yubikey discovered in protocol
This commit is contained in:
parent
03bcd4b2e8
commit
888a372f64
@ -80,8 +80,16 @@ $sync->addField('otp', $syncParams['otp']);
|
||||
# Verify correctness of input parameters
|
||||
#
|
||||
|
||||
foreach (array('modified', 'yk_counter', 'yk_use', 'yk_high', 'yk_low') as $param) {
|
||||
if (preg_match("/^[0-9]*$/", $syncParams[$param])==0) {
|
||||
foreach (array('modified') as $param) {
|
||||
if (preg_match("/^[0-9]+$/", $syncParams[$param])==0) {
|
||||
$myLog->log(LOG_NOTICE, 'Input parameters ' . $param . ' not correct');
|
||||
sendResp(S_MISSING_PARAMETER, $apiKey);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (array('yk_counter', 'yk_use', 'yk_high', 'yk_low') as $param) {
|
||||
if (preg_match("/^(-1|[0-9]+)$/", $syncParams[$param])==0) {
|
||||
$myLog->log(LOG_NOTICE, 'Input parameters ' . $param . ' not correct');
|
||||
sendResp(S_MISSING_PARAMETER, $apiKey);
|
||||
exit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user