From 7d93094012886b2e5fa485bf6272e701798ac95f Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Sat, 27 Jul 2013 21:00:15 +0000 Subject: fix bug 10856 (unfiltered input param leading to a XSS vulnerability) --- en/downloads/get/index.php | 6 ++---- en/downloads/get/lib.php | 6 +++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php index 519932d10..7ddcf9795 100644 --- a/en/downloads/get/index.php +++ b/en/downloads/get/index.php @@ -239,10 +239,8 @@ if (!isset($_SERVER['APP_MODE']) || $_SERVER['APP_MODE'] == 'prod') {
  • notice on the Atelier team mailing-list,'); ?>
  • bug report.'); ?>
  • - -

    -
    -

    + +

    «

    diff --git a/en/downloads/get/lib.php b/en/downloads/get/lib.php index efa69e775..35bbe985c 100644 --- a/en/downloads/get/lib.php +++ b/en/downloads/get/lib.php @@ -76,7 +76,11 @@ function rewrite_city($name) */ function get($s) { - return isset($_GET[$s]) ? trim($_GET[$s]) : null; + if (isset($_GET[$s])) { + return strip_tags(trim($_GET[$s])); + } + + return null; } class NoProductFoundError extends Exception {} -- cgit v1.2.1