Skip to content

Commit

Permalink
Add request parameter filtering to avoid XSS attacks
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalguru committed Jan 28, 2023
1 parent 40ef8c4 commit eca361d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WebApp/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function renderMeta() {
if (!isset($meta['viewport'])) $meta['viewport'] = 'width=device-width, initial-scale=1, shrink-to-fit=no';
if (!isset($meta['pageclass'])) $meta['pageclass'] = get_class($this->page);
if (!isset($meta['canonical'])) {
$params = $this->app->request->params ? '?'.$this->app->request->params : '';
$params = $this->app->request->params ? '?'.\TgUtils\StringFilters::$NO_HTML->filter($this->app->request->params) : '';
$meta['canonical'] = $this->app->router->getCanonicalPath().$params;
}

Expand Down

0 comments on commit eca361d

Please # to comment.