Selaa lähdekoodia

Fix reflective XSS

Jordi Boggiano 7 vuotta sitten
vanhempi
commit
bbe5582802
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/Packagist/WebBundle/Controller/WebController.php

+ 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),
             ]);
         }