[Pkg-privacy-commits] [txtorcon] 71/96: descriptor cookies shouldn't have the == at the end
Jérémy Bobbio
lunar at moszumanska.debian.org
Sun Sep 6 18:33:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository txtorcon.
commit 177d4c70e17683cdb94a276b58253ca6b58cc322
Author: meejah <meejah at meejah.ca>
Date: Sun Feb 15 23:21:13 2015 -0700
descriptor cookies shouldn't have the == at the end
---
test/test_torconfig.py | 6 +++---
txtorcon/torconfig.py | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/test_torconfig.py b/test/test_torconfig.py
index ab9c34e..1ff3cf9 100644
--- a/test/test_torconfig.py
+++ b/test/test_torconfig.py
@@ -1517,15 +1517,15 @@ class HiddenServiceAuthTests(unittest.TestCase):
self.assertEqual(3, len(clients))
self.assertEqual('bar', clients[0].name)
- self.assertEqual('O4rQyZ+IJr2PNHUdeXi0nA==', clients[0].cookie)
+ self.assertEqual('O4rQyZ+IJr2PNHUdeXi0nA', clients[0].cookie)
self.assertEqual('MIICXQIBAAKBgQC1R/bPGTWnpGJpNCfT1KIfFq1QEGHz4enKSEKUDkz1CSEPOMGSbV37dfqTuI4klsFvdUsR3NpYXLin9xRWvw1viKwAN0y8cv5totl4qMxO5i+zcfVhbJiNvVv2EjfEyQaZfAy2PUfp/tAPYZMsyfps2DptWyNR', clients[0].key)
self.assertEqual('foo', clients[1].name)
- self.assertEqual('btlj4+RsWEkxigmlszInhQ==', clients[1].cookie)
+ self.assertEqual('btlj4+RsWEkxigmlszInhQ', clients[1].cookie)
self.assertEqual(clients[1].key, 'MIICXgIBAAKBgQDdLdHU1fbABtFutOFtpdWQdv/9qG1OAc0r1TfaBtkPSNcLezcxSThalIEnRFfejy0suOHmsqspruvn0FEflIEQvFWeXAPvXg==')
self.assertEqual('quux', clients[2].name)
- self.assertEqual('asdlkjasdlfkjalsdkfffj==', clients[2].cookie)
+ self.assertEqual('asdlkjasdlfkjalsdkfffj', clients[2].cookie)
self.assertEqual(None, clients[2].key)
def test_parse_error(self):
diff --git a/txtorcon/torconfig.py b/txtorcon/torconfig.py
index 878f7b0..6774be5 100644
--- a/txtorcon/torconfig.py
+++ b/txtorcon/torconfig.py
@@ -807,6 +807,8 @@ def parse_client_keys(stream):
def set_cookie(self, cookie):
self.cookie = cookie.split()[1]
+ if self.cookie.endswith('=='):
+ self.cookie = self.cookie[:-2]
def add_key_line(self, line):
self.key.append(line)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/txtorcon.git
More information about the Pkg-privacy-commits
mailing list