[Configuration] Use FILTER_VALIDATE_EMAIL on admin/email
This prevents including arbitrary data as email address.
This commit is contained in:
parent
4713fb6190
commit
2bb13169b4
1 changed files with 4 additions and 0 deletions
|
@ -91,6 +91,10 @@ class Configuration {
|
||||||
if(!is_string(self::getConfig('authentication', 'password')))
|
if(!is_string(self::getConfig('authentication', 'password')))
|
||||||
die('Parameter [authentication] => "password" is not a valid string! Please check "config.ini.php"!');
|
die('Parameter [authentication] => "password" is not a valid string! Please check "config.ini.php"!');
|
||||||
|
|
||||||
|
if(!empty(self::getConfig('admin', 'email'))
|
||||||
|
&& !filter_var(self::getConfig('admin', 'email'), FILTER_VALIDATE_EMAIL))
|
||||||
|
die('Parameter [admin] => "email" is not a valid email address! Please check "config.ini.php"!');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getConfig($category, $key) {
|
public static function getConfig($category, $key) {
|
||||||
|
|
Loading…
Reference in a new issue