git » msnlib » commit 34b679e

Fix hash concatenation in passport_auth()

author Alberto Bertogli
2008-12-13 22:19:55 UTC
committer Alberto Bertogli
2008-12-13 22:24:32 UTC
parent b029f327e4ed0623be40be81c11bdc383151b8ad

Fix hash concatenation in passport_auth()

Pablo Mazzini (pmazzini@gmail.com) reported that the hash string contained
some repeated fields (kpp, ct, etc.), and the way the concatenation was
performed leaved the string "tpf=ct=..." which is undesirable.

To be cautious, this patch does not remove the redundant fields, but fixes
the broken concatenation.

Thanks to Pablo Mazzini for the bug report and preliminary patch.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

msnlib.py +2 -1

diff --git a/msnlib.py b/msnlib.py
index ca40614..377f851 100644
--- a/msnlib.py
+++ b/msnlib.py
@@ -541,7 +541,8 @@ class msnd:
 		ahead += ',pwd=' + urllib.quote(self.pwd)
 		ahead += ',lc=1033,id=507,tw=40,fs=1,'
 		ahead += 'ru=http%3A%2F%2Fmessenger%2Emsn%2Ecom,ct=0,'
-		ahead += 'kpp=1,kv=5,ver=2.1.0173.1,tpf=' + hash
+		ahead += 'kpp=1,kv=5,ver=2.1.0173.1,'
+		ahead += hash
 		headers = { 'Authorization': ahead }
 
 		# connect to the given server