Add the possibility to have a '-' in the baseurl

With the actual regex in testBaseURL, we can not have a '-' inside the BaseURL, I did a quick fix
pull/6783/head
Fafner [_KeyZee_] 2020-12-21 14:39:25 +01:00 committed by GitHub
parent 62571cc27f
commit fb7c98ebcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3927,7 +3927,7 @@ class Server extends AppModel
if ($this->testForEmpty($value) !== true) {
return $this->testForEmpty($value);
}
$regex = "/^(?<proto>https?):\/\/(?<host>([\w,\.]+))(?::(?<port>[0-9]+))?(?<base>\/[a-z0-9_\-\.]+)?$/i";
$regex = "/^(?<proto>https?):\/\/(?<host>([\w,\-,\.]+))(?::(?<port>[0-9]+))?(?<base>\/[a-z0-9_\-\.]+)?$/i";
if (
!preg_match($regex, $value, $matches) ||
strtolower($matches['proto']) != strtolower($this->getProto()) ||