1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-01 01:52:18 +01:00
This commit is contained in:
Olov Danielson 2010-01-13 15:32:57 +00:00
parent e5fcbe8ba9
commit ab952c523c
2 changed files with 12 additions and 0 deletions

View File

@ -134,6 +134,7 @@ class Db
private function query($query, $returnresult=false) {
if($this->dbh) {
$this->myLog->log(LOG_DEBUG, 'Query is: ' . $query);
$this->result = $this->dbh->query($query);
if (! $this->result){
$this->myLog->log(LOG_INFO, 'Database error: ' . print_r($this->dbh->errorInfo(), true));

View File

@ -53,6 +53,17 @@ if ($protocol_version<2.0) {
$nonce = md5(uniqid(rand()));
$myLog->log(LOG_INFO, 'protocol version below 2.0. Created nonce ' . $nonce);
}
/* Sanity check HTTP parameters */
/* id, sl, timestamp, timeout, nonce, timestamp */
if (preg_match("/^[0-9]*$/", $client)==0){
$myLog->log(LOG_NOTICE, 'id provided in request must be an integer');
sendResp(S_MISSING_PARAMETER, $apiKey);
exit;
}
//// Get Client info from DB
//
if ($client <= 0) {