mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 01:52:18 +01:00
Always check signatures.
This commit is contained in:
parent
2071c0a5a0
commit
1a9d30108e
@ -140,7 +140,7 @@ function getAuthData($conn, $devId) {
|
||||
|
||||
// $clientId: The decimal client identity
|
||||
function getClientData($conn, $clientId) {
|
||||
$stmt = 'SELECT id, secret, chk_sig, chk_owner, chk_time'.
|
||||
$stmt = 'SELECT id, secret, chk_time'.
|
||||
' FROM clients WHERE active AND id='.mysql_quote($clientId);
|
||||
$r = query($conn, $stmt);
|
||||
if (mysql_num_rows($r) > 0) {
|
||||
|
@ -46,11 +46,7 @@ debug($cd);
|
||||
//
|
||||
$apiKey = base64_decode($cd['secret']);
|
||||
|
||||
if ($cd['chk_sig'] && $h == '') {
|
||||
debug('Signature missing');
|
||||
sendResp(S_MISSING_PARAMETER);
|
||||
exit;
|
||||
} else if ($cd['chk_sig'] || $h != '') {
|
||||
if ($h != '') {
|
||||
// Create the signature using the API key
|
||||
$a = array ();
|
||||
$a['id'] = $client;
|
||||
|
Loading…
x
Reference in New Issue
Block a user