Skip to content

Commit

Permalink
Patch out XSS in edit server (#2471)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapmarcus committed Mar 14, 2022
1 parent 91081b0 commit fd42196
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions web/edit/db/index.php
Expand Up @@ -15,6 +15,7 @@
// Edit as someone else?
if (($_SESSION['userContext'] === 'admin') && (!empty($_GET['user']))) {
$user=escapeshellarg($_GET['user']);
$user_plain=htmlentities($_GET['user']);
}

// List datbase
Expand Down
1 change: 1 addition & 0 deletions web/edit/dns/index.php
Expand Up @@ -15,6 +15,7 @@
// Edit as someone else?
if (($_SESSION['userContext'] === 'admin') && (!empty($_GET['user']))) {
$user=escapeshellarg($_GET['user']);
$user_plain=htmlentities($_GET['user']);
}

// List ip addresses
Expand Down
1 change: 1 addition & 0 deletions web/edit/mail/index.php
Expand Up @@ -15,6 +15,7 @@
// Edit as someone else?
if (($_SESSION['userContext'] === 'admin') && (!empty($_GET['user']))) {
$user=escapeshellarg($_GET['user']);
$user_plain=htmlentities($_GET['user']);
}

$v_username = $user;
Expand Down
1 change: 1 addition & 0 deletions web/edit/web/index.php
Expand Up @@ -16,6 +16,7 @@
// Edit as someone else?
if (($_SESSION['userContext'] === 'admin') && (!empty($_GET['user']))) {
$user=escapeshellarg($_GET['user']);
$user_plain=htmlentities($_GET['user']);
}

// Get all user domains
Expand Down
2 changes: 1 addition & 1 deletion web/templates/pages/edit_server.html
Expand Up @@ -857,7 +857,7 @@
<tr>
<td class="vst-text step-top">
<?=_('SSL Certificate');?>
<span id="generate-csr"> / <a class="generate" target="_blank" href="/generate/ssl/?domain=<?=$v_hostname?>"><?=_('Generate CSR');?></a></span>
<span id="generate-csr"> / <a class="generate" target="_blank" href="/generate/ssl/?domain=<?=htmlentities(trim($v_hostname,'"'));?>"><?=_('Generate CSR');?></a></span>
</td>
</tr>
<tr>
Expand Down

0 comments on commit fd42196

Please sign in to comment.