mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 01:52:18 +01:00
.
This commit is contained in:
parent
e5fcbe8ba9
commit
ab952c523c
@ -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));
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user