summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2012-05-13 14:45:32 +0200
committerBerke Viktor <berkeviktor@aol.com>2012-05-13 14:45:32 +0200
commit5a50da6f827f96f12739a50d8917d43e28191551 (patch)
treebe84de197cae608bab6a1dc3660e72a8a73eb733 /plugins
parentd6510228737d4055df8100a42401f5da0f82c871 (diff)
Sync with FiSHLiM HEAD
Diffstat (limited to 'plugins')
-rw-r--r--plugins/fishlim/README1
-rw-r--r--plugins/fishlim/plugin_xchat.c10
2 files changed, 9 insertions, 2 deletions
diff --git a/plugins/fishlim/README b/plugins/fishlim/README
index 4f315b44..00d7f682 100644
--- a/plugins/fishlim/README
+++ b/plugins/fishlim/README
@@ -26,6 +26,7 @@ Not working:
   * Password-protected key storage
   * Topic encryption
   * Remote exploitation (hopefully!)
+  * Plaintext content that contain +OK is decrypted twice
 
 
 Commands
diff --git a/plugins/fishlim/plugin_xchat.c b/plugins/fishlim/plugin_xchat.c
index 80e6c8cd..5e261116 100644
--- a/plugins/fishlim/plugin_xchat.c
+++ b/plugins/fishlim/plugin_xchat.c
@@ -44,7 +44,7 @@
 
 static const char plugin_name[] = "FiSHLiM";
 static const char plugin_desc[] = "Encryption plugin for the FiSH protocol. Less is More!";
-static const char plugin_version[] = "0.0.15";
+static const char plugin_version[] = "0.0.16";
 
 static const char usage_setkey[] = "Usage: SETKEY [<nick or #channel>] <password>, sets the key for a channel or nick";
 static const char usage_delkey[] = "Usage: DELKEY <nick or #channel>, deletes the key for a channel or nick";
@@ -161,9 +161,15 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
             // Add the encrypted data
             peice = decrypted;
             uw++; // Skip "OK+"
+            
+            if (ew == w+1) {
+                // Prefix with colon, which gets stripped out otherwise
+                if (!append(&message, &length, ":")) goto decrypt_error;
+            }
+            
         } else {
             // Add unencrypted data (for example, a prefix from a bouncer or bot)
-            peice = (uw == w+1 ? word[uw]+1 : word[uw]);
+            peice = word[uw];
         }
         
         if (!append(&message, &length, peice)) goto decrypt_error;