From 784c4020017d260775339c1231052ca4eb387f02 Mon Sep 17 00:00:00 2001 From: Moritz Naumann Date: Tue, 27 Aug 2013 16:42:49 +0200 Subject: [PATCH] XSS bug in db.debian.org Hi, I just stumbled upon an XSS bug in db.debian.org: https://db.debian.org/search.cgi?id=%22%3E%3C/a%3E%3Cscript%3Ealert%28%27XSS%27%29%3C/script%3E%3Cx%20y=%22&dosearch=Search... Both the "id" and "authtoken" fields lack input validation. bfly: you can find the code at git.debian.org in userdir-ldap-cgi would be nice if you could send a patch A (n untested) patch is attached. Please let me know whether it's usable and whether you are going to apply it. -- Moritz Signed-off-by: Martin Zobel-Helas --- search.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search.cgi b/search.cgi index 2757d2f..9a38e3e 100755 --- a/search.cgi +++ b/search.cgi @@ -236,7 +236,7 @@ if (!$dosearch) { # If this is ourselves, present a link to do mods if ($auth && ($id eq $data->{uid}->[0])) { #TODO: extract this string into a url for translation... - $outsub{searchresults} .= "Edit my settings\n"; + $outsub{searchresults} .= "Edit my settings\n"; } $outsub{searchresults} .= "


\n"; -- 2.20.1