From 0a82e6bcced5eff7fb18ed3fd61b0be3d5809e79 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 6 May 2009 14:42:44 +0000 Subject: [PATCH] Fix field names. --- ykval-common.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ykval-common.php b/ykval-common.php index fa4a006..fc97bc0 100644 --- a/ykval-common.php +++ b/ykval-common.php @@ -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); }