mirror of https://github.com/MISP/MISP
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 fixpull/6783/head
parent
62571cc27f
commit
fb7c98ebcf
|
@ -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()) ||
|
||||
|
|
Loading…
Reference in New Issue