[Pkg-privacy-commits] [torbrowser-launcher] 10/11: 94d184a Only convert unicode URLs to strings if they are actually unicode (#205). (Closes: #805078)

Holger Levsen holger at moszumanska.debian.org
Sat Jan 16 12:31:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch debian/jessie
in repository torbrowser-launcher.

commit f4c3b3938552ce0f57ed14bb3039a9e1b64d7980
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Jan 16 13:17:19 2016 +0100

    94d184a Only convert unicode URLs to strings if they are actually unicode (#205). (Closes: #805078)
---
 debian/changelog                                   |  2 ++
 ...t-unicode-URLs-to-strings-if-they-are-act.patch | 29 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 32 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 95eedb3..ec47984 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ torbrowser-launcher (0.1.9-1+deb8u2) UNRELEASED; urgency=medium
     - ab141ee Stop using sha256sums.txt and sha256sums.txt.asc (fixes #180),
       (includes 7829f3e cleanup commit.)
     - 1ff1055 Force download URLs to be strings and not unicode (#205).
+    - 94d184a Only convert unicode URLs to strings if they are actually
+      unicode (#205). (Closes: #805078)
 
  -- Holger Levsen <holger at debian.org>  Fri, 15 Jan 2016 20:46:52 +0100
 
diff --git a/debian/patches/0010-Only-convert-unicode-URLs-to-strings-if-they-are-act.patch b/debian/patches/0010-Only-convert-unicode-URLs-to-strings-if-they-are-act.patch
new file mode 100644
index 0000000..2ca459c
--- /dev/null
+++ b/debian/patches/0010-Only-convert-unicode-URLs-to-strings-if-they-are-act.patch
@@ -0,0 +1,29 @@
+From 94d184a26bb77f46e8256c23246fe68fa49552b0 Mon Sep 17 00:00:00 2001
+From: Micah Lee <micah at micahflee.com>
+Date: Sun, 8 Nov 2015 16:27:03 -0800
+Subject: [PATCH] Only convert unicode URLs to strings if they are actually
+ unicode (#205)
+
+---
+ torbrowser_launcher/launcher.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
+index 671bee7..ff4adcd 100644
+--- a/torbrowser_launcher/launcher.py
++++ b/torbrowser_launcher/launcher.py
+@@ -447,7 +447,10 @@ class Launcher:
+         self.current_download_url = url
+ 
+         mirror_url = url.format(self.common.settings['mirror'])
+-        mirror_url = unicodedata.normalize('NFKD', mirror_url).encode('ascii','ignore') # fix for #205
++
++        # convert mirror_url from unicode to string, if needed (#205)
++        if isinstance(mirror_url, unicode):
++            mirror_url = unicodedata.normalize('NFKD', mirror_url).encode('ascii','ignore')
+ 
+         # initialize the progress bar
+         self.progressbar.set_fraction(0)
+-- 
+1.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 4b0d86b..951ca3d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 0007-Stop-using-sha256sums.txt-and-sha256sums.txt.asc-fix.patch
 0008-Eek-removed-testing-code-that-never-should-have-been.patch
 0009-Force-download-URLs-to-be-strings-and-not-unicode-20.patch
+0010-Only-convert-unicode-URLs-to-strings-if-they-are-act.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git



More information about the Pkg-privacy-commits mailing list