diff --git a/ykval-config.php b/ykval-config.php index e577666..ab20fc3 100644 --- a/ykval-config.php +++ b/ykval-config.php @@ -29,7 +29,9 @@ //ykval will use the configuration stored in /etc/yubico/val/config-db.php, if that file exists. If it does not exist, the below values will be used. -if(!include '/etc/yubico/val/config-db.php') { +if(file_exists('/etc/yubico/val/config-db.php')) { + include '/etc/yubico/val/config-db.php'; +} else { $dbuser='ykval_verifier'; $dbpass='yourpassword'; $basepath=''; @@ -39,7 +41,6 @@ if(!include '/etc/yubico/val/config-db.php') { $dbtype='mysql'; } - # For the validation interface. $baseParams = array (); $baseParams['__YKVAL_DB_DSN__'] = "$dbtype:dbname=$dbname;host=127.0.0.1"; # "oci:oracledb" for Oracle DB (with OCI library)