mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
add further domain validation feedback
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
aee32ed357
commit
838084f073
1 changed files with 10 additions and 0 deletions
|
|
@ -239,6 +239,16 @@ class ConfigurationManager
|
||||||
throw new InvalidSettingConfigurationException("Domain must contain at least one dot!");
|
throw new InvalidSettingConfigurationException("Domain must contain at least one dot!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Validate that no slashes are contained
|
||||||
|
if (strpos($domain, '/') !== false) {
|
||||||
|
throw new InvalidSettingConfigurationException("Domain must not contain slashes!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate that no colons are contained
|
||||||
|
if (strpos($domain, ':') !== false) {
|
||||||
|
throw new InvalidSettingConfigurationException("Domain must not contain colons!");
|
||||||
|
}
|
||||||
|
|
||||||
// Validate domain
|
// Validate domain
|
||||||
if (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
if (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
||||||
throw new InvalidSettingConfigurationException("Domain is not a valid domain!");
|
throw new InvalidSettingConfigurationException("Domain is not a valid domain!");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue