Explorar o código

Fix reflective XSS

Jordi Boggiano %!s(int64=8) %!d(string=hai) anos
pai
achega
bbe5582802
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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),
             ]);
         }