Skip to content

Commit

Permalink
SearchConf: fix XSS vulnerability
Browse files Browse the repository at this point in the history
Search configuration page allows for XSS injection attack.

Related to #774
  • Loading branch information
getdatakick committed Aug 6, 2020
1 parent bd84c2f commit 9234fa8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions controllers/admin/AdminSearchConfController.php
Expand Up @@ -397,6 +397,8 @@ public function renderForm()
*
* @return void
*
* @throws PrestaShopDatabaseException
* @throws PrestaShopException
* @since 1.0.0
*/
public function processSave()
Expand All @@ -408,11 +410,11 @@ public function processSave()
$this->errors[] = $this->l('Aliases and results are both required.');
}
if (!Validate::isValidSearch($search)) {
$this->errors[] = $search.' '.$this->l('Is not a valid result');
$this->errors[] = Tools::safeOutput($search) . ' ' . $this->l('Is not a valid result');
}
foreach ($aliases as $alias) {
if (!Validate::isValidSearch($alias)) {
$this->errors[] = $alias.' '.$this->l('Is not a valid alias');
$this->errors[] = Tools::safeOutput($alias) . ' ' . $this->l('Is not a valid alias');
}
}

Expand Down

0 comments on commit 9234fa8

Please sign in to comment.