Skip to content

Commit

Permalink
fix XSS vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
julescournut committed Sep 16, 2022
1 parent 5e42d72 commit 8e4da81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>2.1.1</version>
<version>2.1.2</version>
<authors>
<author>
<name>Gilles Bourgeat</name>
Expand Down
8 changes: 1 addition & 7 deletions EventListener/CanonicalUrlListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,7 @@ public function generateUrlCanonical(CanonicalUrlEvent $event): void

$canonicalUrl = rtrim($canonicalUrl, '/');
} else {
if (null === $queryString = $request->server->get('QUERY_STRING')) {
$queryString = $request->getQueryString();
}

if (!empty($queryString)) {
$canonicalUrl .= '/?'.$queryString;
}
$canonicalUrl .= '/?'. (array_key_exists("query", $parseUrlByCurrentLocale)) ? $parseUrlByCurrentLocale['query'] : "";
}

try {
Expand Down

0 comments on commit 8e4da81

Please sign in to comment.