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

[tor-commits] [tor-messenger-build/master] Temporary workaround for the slash me leak



commit 0659e27e0a2468334c59f3a79065f09e63d3444c
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Wed Nov 5 21:48:51 2014 -0800

    Temporary workaround for the slash me leak
---
 projects/instantbird/config        |    1 +
 projects/instantbird/slashme.patch |   44 ++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/projects/instantbird/config b/projects/instantbird/config
index 35b476c..91414d0 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -43,6 +43,7 @@ input_files:
     pkg_type: src
   - filename: preferences.patch
   - filename: irc.patch
+  - filename: slashme.patch
   - filename: xmpp.patch
   - filename: facebook.patch
   - filename: accountcreation.patch
diff --git a/projects/instantbird/slashme.patch b/projects/instantbird/slashme.patch
new file mode 100644
index 0000000..f979fff
--- /dev/null
+++ b/projects/instantbird/slashme.patch
@@ -0,0 +1,44 @@
+# HG changeset patch
+# User Arlo Breault <arlolra@xxxxxxxxx>
+# Date 1415252765 28800
+#      Wed Nov 05 21:46:05 2014 -0800
+# Node ID 17ce33f549af16468fc96d2eb5292a148505479e
+# Parent  49fc79e39b9c292d182a46aa800135bd65b6c38f
+Slash me hack
+
+ * Temporarily work around this leak until a cleaner solution is found.
+
+diff --git a/chat/protocols/irc/ircCommands.jsm b/chat/protocols/irc/ircCommands.jsm
+--- a/chat/protocols/irc/ircCommands.jsm
++++ b/chat/protocols/irc/ircCommands.jsm
+@@ -72,26 +72,20 @@ function setMode(aNickname, aConv, aMode
+                   [aConv.name, (aAdd ? "+" : "-") + aMode, aNick]));
+ }
+ 
+ function actionCommand(aMsg, aConv) {
+   // Don't try to send an empty action.
+   if (!aMsg || !aMsg.trim().length)
+     return false;
+ 
+-  let conv = getConv(aConv);
+-  let account = getAccount(aConv);
+-  if (!ctcpCommand(aConv, aConv.name, "ACTION", aMsg)) {
+-    conv.writeMessage(account._currentServerName, _("error.sendMessageFailed"),
+-                      {error: true, system: true});
+-    return true;
+-  }
+-
+-  // Show the action on our conversation.
+-  conv.writeMessage(account._nickname, "/me " + aMsg, {outgoing: true});
++  let conv = Services.conversations.getUIConversation(aConv);
++  if (!conv)
++    return false;
++  conv.sendMsg("/me " + aMsg);
+   return true;
+ }
+ 
+ // This will open the conversation, and send and display the text.
+ // aReturnedConv is optional and returns the resulting conversation.
+ function privateMessage(aConv, aMsg, aNickname, aReturnedConv) {
+   if (!aMsg.length)
+     return false;

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits