Skip to content

Commit eca361d

Browse files
committed
Add request parameter filtering to avoid XSS attacks
1 parent 40ef8c4 commit eca361d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebApp/Layout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function renderMeta() {
6161
if (!isset($meta['viewport'])) $meta['viewport'] = 'width=device-width, initial-scale=1, shrink-to-fit=no';
6262
if (!isset($meta['pageclass'])) $meta['pageclass'] = get_class($this->page);
6363
if (!isset($meta['canonical'])) {
64-
$params = $this->app->request->params ? '?'.$this->app->request->params : '';
64+
$params = $this->app->request->params ? '?'.\TgUtils\StringFilters::$NO_HTML->filter($this->app->request->params) : '';
6565
$meta['canonical'] = $this->app->router->getCanonicalPath().$params;
6666
}
6767

0 commit comments

Comments
 (0)