mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
[Configuration] Use FILTER_VALIDATE_EMAIL on admin/email
This prevents including arbitrary data as email address.
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user