Skip to content

Commit

Permalink
Merge pull request #529 from sebastian-meyer/fix-xss-issue-2.x
Browse files Browse the repository at this point in the history
Fix XSS issue for 2.x
  • Loading branch information
sebastian-meyer authored Jul 16, 2020
2 parents a970bf0 + 95de0db commit 31a7fe1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/listview/class.tx_dlf_listview.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ protected function getSortingForm() {

if ($piVar != 'order' && $piVar != 'DATA' && !empty($value)) {

$sorting .= '<input type="hidden" name="'.$this->prefixId.'['.$piVar.']" value="'.$value.'" />';
$sorting .= '<input type="hidden" name="'.$this->prefixId.'['.$piVar.']" value="'.htmlspecialchars($value).'" />';

}

Expand All @@ -385,7 +385,7 @@ protected function getSortingForm() {

foreach ($this->sortables as $index_name => $label) {

$sorting .= '<option value="'.$index_name.'"'.(($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '').'>'.htmlspecialchars($label).'</option>';
$sorting .= '<option value="'.htmlspecialchars($index_name).'"'.(($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '').'>'.htmlspecialchars($label).'</option>';

}

Expand Down
2 changes: 1 addition & 1 deletion plugins/navigation/class.tx_dlf_navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function getPageSelector() {

if ($piVar != 'page' && $piVars != 'DATA' && !empty($value)) {

$output .= '<input type="hidden" name="'.$this->prefixId.'['.$piVar.']" value="'.$value.'" />';
$output .= '<input type="hidden" name="'.$this->prefixId.'['.$piVar.']" value="'.htmlspecialchars($value).'" />';

}

Expand Down
4 changes: 2 additions & 2 deletions plugins/pageview/class.tx_dlf_pageview.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ protected function addBasketForm() {

$output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">';

$output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.$this->piVars['page'].'">';
$output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.htmlspecialchars($this->piVars['page']).'">';

$output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.$this->piVars['page'].'">';
$output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.htmlspecialchars($this->piVars['page']).'">';

$output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">';

Expand Down

0 comments on commit 31a7fe1

Please sign in to comment.