mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Merge pull request #2252 from nextcloud/enh/noid/domain-dot
domain must contain at least one dot
This commit is contained in:
commit
565a84a7bf
1 changed files with 5 additions and 0 deletions
|
|
@ -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!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue