allow domain-redirect to internal-ipaddress

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-12-20 17:20:40 +01:00
parent 24fa1d39ed
commit 2dd226c96c
4 changed files with 31 additions and 4 deletions

View File

@@ -538,7 +538,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
{
// check whether an URL was specified
$_doredirect = false;
if (!empty($url) && Validate::validateUrl($url)) {
if (!empty($url) && Validate::validateUrl($url, true)) {
$path = $url;
$_doredirect = true;
} else {
@@ -546,7 +546,7 @@ class SubDomains extends ApiCommand implements ResourceEntity
}
// check whether path is a real path
if (!preg_match('/^https?\:\/\//', $path) || !Validate::validateUrl($path)) {
if (!preg_match('/^https?\:\/\//', $path) || !Validate::validateUrl($path, true)) {
if (strstr($path, ":") !== false) {
Response::standardError('pathmaynotcontaincolon', '', true);
}