1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-01-20 01:52:15 +01:00

Fix field names.

This commit is contained in:
Simon Josefsson 2009-05-06 14:42:44 +00:00
parent 5ba43fe314
commit 0a82e6bcce

View File

@ -189,11 +189,11 @@ function KSMdecryptOTP($urls) {
// $devId: The first 12 chars from the OTP
function getAuthData($conn, $devId) {
$tokenId = modhex2b64($devId);
$publicName = modhex2b64($devId);
$stmt =
'SELECT id, active, counter, sessionUse, low, high, accessed '.
'FROM yubikeys '.
'WHERE tokenId='.mysql_quote($tokenId);
'WHERE publicName='.mysql_quote($publicName);
$r = query($conn, $stmt);
if (mysql_num_rows($r) > 0) {
$row = mysql_fetch_assoc($r);
@ -204,9 +204,9 @@ function getAuthData($conn, $devId) {
} // End getAuthData
function addNewKey($conn, $devId) {
$tokenId = modhex2b64($devId);
$stmt = 'INSERT INTO yubikeys (active, created, tokenId, counter) '.
'VALUES (true, NOW(), ' . mysql_quote($tokenId) . ', 0)';
$publicName = modhex2b64($devId);
$stmt = 'INSERT INTO yubikeys (active, created, publicName, counter) '.
'VALUES (true, NOW(), ' . mysql_quote($publicName) . ', 0)';
$r = query($conn, $stmt);
}