Skip to content

Commit

Permalink
fix #1752
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Apr 3, 2022
1 parent a583f4c commit abc9599
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lhc_web/modules/lhcobrowse/proxycss.php
Expand Up @@ -15,7 +15,13 @@
$browse = erLhcoreClassCoBrowse::getBrowseInstance($chat);
}

$url = parse_url($_GET['base']);
$base = trim($_GET['base']);

if (!filter_var($base, FILTER_VALIDATE_URL)) {
exit;
}

$url = parse_url($base);

// Only http/https supported
if (!in_array($url['scheme'],['http','https']) || (isset($url['port']) && !in_array($url['port'],[80,443]))) {
Expand All @@ -42,7 +48,7 @@
}
} else {

if (!in_array($urlCSS['scheme'],['http','https']) || (isset($urlCSS['port']) && !in_array($urlCSS['port'],[80,443]))) {
if (!filter_var($_GET['css'], FILTER_VALIDATE_URL) || !in_array($urlCSS['scheme'],['http','https']) || (isset($urlCSS['port']) && !in_array($urlCSS['port'],[80,443]))) {
exit;
}

Expand Down

0 comments on commit abc9599

Please sign in to comment.