From 7f8ecb4728ad6452362b88d8f2476e0d084b7a8a Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Tue, 2 Dec 2008 18:20:42 +0000 Subject: [PATCH] add sn --- addKey.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addKey.php b/addKey.php index 1fadb39..d8842ea 100644 --- a/addKey.php +++ b/addKey.php @@ -25,6 +25,12 @@ if ($h == '') { exit; } +$sn = getHttpVal('sn', ''); +if ($sn == '') { + reply(S_MISSING_PARAMETER, '', $client, $nonce, 'sn'); + exit; +} + $op = getHttpVal('operation', ''); if ($op == '') { @@ -66,7 +72,7 @@ if ($reqHash != $h) { $tokenId = base64_encode(genRandRaw(6)); $secret = base64_encode(genRandRaw(16)); -$keyid = addNewKey($tokenId, 1, $secret, '', $client); +$keyid = addNewKey($tokenId, 1, $secret, '', $client, $sn); if ($keyid > 0) { debug('Key '.$keyid.' added');