mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-28 14:30:13 +00:00
domain must contain at least one dot
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
@@ -234,6 +234,11 @@ class ConfigurationManager
|
||||
* @throws InvalidSettingConfigurationException
|
||||
*/
|
||||
public function SetDomain(string $domain) : void {
|
||||
// Validate that at least one dot is contained
|
||||
if (strpos($domain, '.') === false) {
|
||||
throw new InvalidSettingConfigurationException("Domain must contain at least one dot!");
|
||||
}
|
||||
|
||||
// Validate domain
|
||||
if (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
||||
throw new InvalidSettingConfigurationException("Domain is not a valid domain!");
|
||||
|
||||
Reference in New Issue
Block a user