[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Fix a bug that prevents overcompressed messages from be...



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria:/tmp/cvs-serv14626/lib/mixminion

Modified Files:
	ClientMain.py Packet.py 
Log Message:
Fix a bug that prevents overcompressed messages from being decompressed, even when -F is given.

Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- ClientMain.py	12 Dec 2004 22:28:39 -0000	1.184
+++ ClientMain.py	15 Jul 2005 20:42:26 -0000	1.185
@@ -1702,7 +1702,8 @@
 
 def clientDecode(cmd, args):
     """[Entry point] Decode a message."""
-    options, args = getOptions(args, input=1, output=1, passphrase=1)
+    options, args = getOptions(args, "F", ["--force"], input=1, output=1,
+                               passphrase=1)
 
     outputFile = '-'
     inputFile = '-'

Index: Packet.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Packet.py,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- Packet.py	4 Jun 2005 13:53:11 -0000	1.81
+++ Packet.py	15 Jul 2005 20:42:27 -0000	1.82
@@ -778,7 +778,7 @@
             msgType = "ENC"
 
         if msgType == 'LONG' and force:
-            msg = uncompressData(msg)
+            val = uncompressData(val)
 
         if msgType in ('TXT','BIN','LONG','FRAG'):
             res.append(TextEncodedMessage(val, msgType))
@@ -957,7 +957,7 @@
        maxLength, we raise 'CompressedDataTooLong'."""
 
     if len(payload) < 6 or payload[0:2] != '\x78\xDA':
-        raise ParseError("Invalid zlib header")
+        raise ParseError("Invalid zlib header");
 
     # This code is necessary because versions of Python before 2.2 didn't
     # support limited-size versions of zlib.decompress.  We use a helper