Procházet zdrojové kódy

Fix reflective XSS

Jordi Boggiano před 7 roky
rodič
revize
bbe5582802

+ 2 - 2
src/Packagist/WebBundle/Controller/WebController.php

@@ -80,8 +80,8 @@ class WebController extends Controller
         if ($req->getRequestFormat() !== 'json') {
             return $this->render('PackagistWebBundle:Web:search.html.twig', [
                 'packages' => [],
-                'tags' => (array) $tagsFilter,
-                'type' => $typeFilter,
+                'tags' => array_map('htmlentities', (array) $tagsFilter),
+                'type' => htmlentities($typeFilter),
             ]);
         }