Skip to content

Commit

Permalink
Fix XSS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-meyer committed Jul 27, 2020
1 parent 769f341 commit 6a67256
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/Plugin/ListView.php
Expand Up @@ -268,7 +268,7 @@ protected function getSortingForm()
$sorting = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />';
foreach ($this->piVars as $piVar => $value) {
if ($piVar != 'order' && $piVar != 'DATA' && !empty($value)) {
$sorting .= '<input type="hidden" name="' . $this->prefixId . '[' . $piVar . ']" value="' . htmlspecialchars($value) . '" />';
$sorting .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($value) . '" />';
}
}
// Select sort field.
Expand Down
2 changes: 1 addition & 1 deletion Classes/Plugin/Navigation.php
Expand Up @@ -73,7 +73,7 @@ protected function getPageSelector()
// Add plugin variables.
foreach ($this->piVars as $piVar => $value) {
if ($piVar != 'page' && $piVar != 'DATA' && !empty($value)) {
$output .= '<input type="hidden" name="' . $this->prefixId . '[' . $piVar . ']" value="' . htmlspecialchars($value) . '" />';
$output .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($value) . '" />';
}
}
// Add page selector.
Expand Down

0 comments on commit 6a67256

Please sign in to comment.