Bug#184140: Please encode URLs containing plus signs
tag 184140 + patch
thanks
Heya,
I found the issue and prepared a patch.
Marc
--
BOFH #14:
sounds like a Windows problem, try calling Microsoft support
>From 59a8ad502123e34f496a0f9d9cd381f9c190a829 Mon Sep 17 00:00:00 2001
From: Marc Brockschmidt <he@debian.org>
Date: Wed, 23 Sep 2009 17:52:48 +0000
Subject: [PATCH] Quote input used in URLs (closes: #184140)
---
update_out/update_out.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/update_out/update_out.py b/update_out/update_out.py
index fe566a4..70fad9d 100755
--- a/update_out/update_out.py
+++ b/update_out/update_out.py
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-import sys, re, string, time, random, math
+import sys, re, string, time, random, math, urllib
import britney
if len(sys.argv) != 4:
@@ -563,8 +563,8 @@ def should_upgrade_src(src, suite, orig, origpkgs, new, newpkgs, approvals,
for v in oodbins.keys():
if oodtxt: oodtxt = oodtxt + "; "
oodtxt = oodtxt + "%s (from <a href=\"http://buildd.debian.org/build.php?arch=%s&pkg=%s&ver=%s\" target=\"_blank\">%s</a>)" % \
- (", ".join(oodbins[v]), arch, src, v, v)
- text = "out of date on <a href=\"http://buildd.debian.org/build.php?arch=%s&pkg=%s&ver=%s\" target=\"_blank\">%s</a>: %s" % (arch, src, srcv, arch, oodtxt)
+ (", ".join(oodbins[v]), arch, urllib.quote(src), urllib.quote(srcv), v)
+ text = "out of date on <a href=\"http://buildd.debian.org/build.php?arch=%s&pkg=%s&ver=%s\" target=\"_blank\">%s</a>: %s" % (arch, urllib.quote(src), urllib.quote(srcv), arch, oodtxt)
if arch in fuckedarches:
text = text + " (but %s isn't keeping up," % \
@@ -589,10 +589,10 @@ def should_upgrade_src(src, suite, orig, origpkgs, new, newpkgs, approvals,
if len(newb) > 0:
updatecand = 0
exc.addhtml("%s (%s) <a href=\"http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&data=%s&sev-inc=critical&sev-inc=grave&sev-inc=serious\" target=\"_blank\">has new bugs</a>!" % \
- (pkg, ", ".join(pkgs[pkg]), pkg))
- exc.addhtml("Updating %s introduces new bugs: %s" % (pkg, ", ".join(["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (a,a) for a in newb])))
+ (pkg, ", ".join(pkgs[pkg]), urllib.quote(pkg)))
+ exc.addhtml("Updating %s introduces new bugs: %s" % (pkg, ", ".join(["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (urllib.quote(a),a) for a in newb])))
if len(oldb) > 0:
- exc.addhtml("Updating %s fixes old bugs: %s" % (pkg, ", ".join(["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (a,a) for a in oldb])))
+ exc.addhtml("Updating %s fixes old bugs: %s" % (pkg, ", ".join(["<a href=\"http://bugs.debian.org/%s\">#%s</a>" % (urllib.quote(a),a) for a in oldb])))
if len(oldb) > len(newb) and len(newb) > 0:
exc.addhtml("%s introduces new bugs, so still ignored (even though it fixes more than it introduces, whine at debian-release)" % (pkg))
--
1.6.3.3
Reply to: