1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-01 01:52:18 +01:00

Modify config-db.php include to check for file instead of doing a (failed) include and spamming the log files that the file doesn't exist

This commit is contained in:
Cam 2015-05-28 01:06:57 +00:00
parent c30ab6062e
commit 0a52e8611f

View File

@ -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)