[tor-commits] [tor-messenger-build/esr52] Bug 16606: Temporary XMPP accounts

sukhbir at torproject.org sukhbir at torproject.org
Sat Sep 2 01:42:08 UTC 2017


commit a0c459f20779f10a13d9045ae7ef63efeb8423e5
Author: Sukhbir Singh <sukhbir at torproject.org>
Date:   Mon Aug 21 23:08:32 2017 -0400

    Bug 16606: Temporary XMPP accounts
---
 .../0001-Set-Tor-Messenger-preferences.patch       |   4 +-
 ...c-21634-Autologin-default-should-be-false.patch |   4 +-
 .../0003-XMPP-in-band-registration.patch           |   4 +-
 .../instantbird/0004-Remove-search-from-UI.patch   |   4 +-
 .../0005-Add-Tor-Messenger-branding.patch          |   4 +-
 ...ve-option-for-configuring-account-picture.patch |   4 +-
 .../0007-Modify-top-protocol-defaults.patch        |   4 +-
 .../instantbird/0008-Modify-IRC-defaults.patch     |   4 +-
 .../0009-Do-not-set-default-XMPP-server.patch      |   4 +-
 projects/instantbird/0010-Modify-themes.patch      |   4 +-
 projects/instantbird/0011-Remove-logging-UI.patch  |   4 +-
 projects/instantbird/0012-Cert-override.patch      |   4 +-
 .../0013-Display-all-traffic-over-Tor.patch        |   4 +-
 .../instantbird/0014-Trac-17480-Content-sink.patch |   4 +-
 .../0015-SASL-ECDSA-NIST256P-CHALLENGE.patch       |   4 +-
 ...-Use-built-in-functions-instead-of-an-svg.patch |   4 +-
 ...-Add-a-pref-to-disable-JavaScript-in-brow.patch |   4 +-
 ...517-Use-different-color-for-Add-Exception.patch |   4 +-
 ...21736-Hide-account-timestamp-from-message.patch |   4 +-
 ...wed-duplicated-files-for-Windows-and-Linu.patch |   4 +-
 ...g-13855-Use-known-onions-for-XMPP-servers.patch |   9 +-
 .../0022-Bug-16606-Automatic-XMPP-accounts.patch   | 158 +++++++++++++++++++++
 projects/instantbird/config                        |   1 +
 23 files changed, 203 insertions(+), 45 deletions(-)

diff --git a/projects/instantbird/0001-Set-Tor-Messenger-preferences.patch b/projects/instantbird/0001-Set-Tor-Messenger-preferences.patch
index 0f90002..454b0e6 100644
--- a/projects/instantbird/0001-Set-Tor-Messenger-preferences.patch
+++ b/projects/instantbird/0001-Set-Tor-Messenger-preferences.patch
@@ -1,7 +1,7 @@
-From 84b615b2662ff85ad071d988455e17dbca96e0aa Mon Sep 17 00:00:00 2001
+From 945f92e09e833c6e6a86d2abdea5eac0da6f21a2 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Wed, 26 Jul 2017 14:30:41 -0400
-Subject: [PATCH 01/21] Set Tor Messenger preferences
+Subject: [PATCH 01/22] Set Tor Messenger preferences
 
 ---
  im/app/profile/all-instantbird.js | 451 ++++++++++++++++++++++++++++++++++++--
diff --git a/projects/instantbird/0002-Trac-21634-Autologin-default-should-be-false.patch b/projects/instantbird/0002-Trac-21634-Autologin-default-should-be-false.patch
index 4194828..fdb5a5a 100644
--- a/projects/instantbird/0002-Trac-21634-Autologin-default-should-be-false.patch
+++ b/projects/instantbird/0002-Trac-21634-Autologin-default-should-be-false.patch
@@ -1,7 +1,7 @@
-From 7e93084b924a4a3ffdaf6576b1e948f96ae4bcc5 Mon Sep 17 00:00:00 2001
+From daa4c63a9235f95096e878360e3e84f0d1da8eb6 Mon Sep 17 00:00:00 2001
 From: Arlo Breault <arlolra at gmail.com>
 Date: Mon, 16 Nov 2015 20:37:53 -0800
-Subject: [PATCH 02/21] Trac 21634: Autologin default should be false
+Subject: [PATCH 02/22] Trac 21634: Autologin default should be false
 
 ---
  chat/components/src/imAccounts.js | 2 +-
diff --git a/projects/instantbird/0003-XMPP-in-band-registration.patch b/projects/instantbird/0003-XMPP-in-band-registration.patch
index 6272854..3e2aa9d 100644
--- a/projects/instantbird/0003-XMPP-in-band-registration.patch
+++ b/projects/instantbird/0003-XMPP-in-band-registration.patch
@@ -1,7 +1,7 @@
-From 4cc5afe3185cc2fcbc934392e088ee4ff83f39a6 Mon Sep 17 00:00:00 2001
+From a71e9f9b63396b38184c2ee9554a0c752eed898e Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Wed, 26 Jul 2017 15:09:40 -0400
-Subject: [PATCH 03/21] XMPP in-band registration
+Subject: [PATCH 03/22] XMPP in-band registration
 
 ---
  chat/locales/en-US/xmpp.properties                 |   5 +
diff --git a/projects/instantbird/0004-Remove-search-from-UI.patch b/projects/instantbird/0004-Remove-search-from-UI.patch
index f4a32e4..ada0dc6 100644
--- a/projects/instantbird/0004-Remove-search-from-UI.patch
+++ b/projects/instantbird/0004-Remove-search-from-UI.patch
@@ -1,7 +1,7 @@
-From 33ccdd4229b2cc15c19c3e25048d8a3abdfec82d Mon Sep 17 00:00:00 2001
+From 93d9f82d1f4c6bb6af794bbc78510440da96dc2e Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Mon, 10 Oct 2016 18:47:48 -0700
-Subject: [PATCH 04/21] Remove search from UI
+Subject: [PATCH 04/22] Remove search from UI
 
 ---
  im/content/nsContextMenu.js         | 18 +-----------------
diff --git a/projects/instantbird/0005-Add-Tor-Messenger-branding.patch b/projects/instantbird/0005-Add-Tor-Messenger-branding.patch
index 2a9f3bd..dfc3bc0 100644
--- a/projects/instantbird/0005-Add-Tor-Messenger-branding.patch
+++ b/projects/instantbird/0005-Add-Tor-Messenger-branding.patch
@@ -1,7 +1,7 @@
-From 58f6a00e81e0d20cfe61d7c6dd230190f3e33a89 Mon Sep 17 00:00:00 2001
+From 2501959f0047cc79909fe5ea2d9cf36bb49b0e84 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Wed, 26 Jul 2017 15:46:51 -0400
-Subject: [PATCH 05/21] Add Tor Messenger branding
+Subject: [PATCH 05/22] Add Tor Messenger branding
 
 ---
  im/app/macbuild/Contents/Info.plist.in             |   2 +-
diff --git a/projects/instantbird/0006-Remove-option-for-configuring-account-picture.patch b/projects/instantbird/0006-Remove-option-for-configuring-account-picture.patch
index 284c6ce..139eb03 100644
--- a/projects/instantbird/0006-Remove-option-for-configuring-account-picture.patch
+++ b/projects/instantbird/0006-Remove-option-for-configuring-account-picture.patch
@@ -1,7 +1,7 @@
-From b8f2cc52982c7ad5a0bf6065b2c543a0b8ce980b Mon Sep 17 00:00:00 2001
+From 29aa4176a752fb024272145e1407c4c8294667a7 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Mon, 10 Oct 2016 19:24:09 -0700
-Subject: [PATCH 06/21] Remove option for configuring account picture
+Subject: [PATCH 06/22] Remove option for configuring account picture
 
 ---
  im/content/blist.xul | 3 +--
diff --git a/projects/instantbird/0007-Modify-top-protocol-defaults.patch b/projects/instantbird/0007-Modify-top-protocol-defaults.patch
index e573a16..36a545e 100644
--- a/projects/instantbird/0007-Modify-top-protocol-defaults.patch
+++ b/projects/instantbird/0007-Modify-top-protocol-defaults.patch
@@ -1,7 +1,7 @@
-From abca165ac3a238cf896444ef1062dd3413ab7003 Mon Sep 17 00:00:00 2001
+From 7e5fbd59826780777c7b92379d78862d8bd05612 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Wed, 26 Jul 2017 16:16:09 -0400
-Subject: [PATCH 07/21] Modify top protocol defaults
+Subject: [PATCH 07/22] Modify top protocol defaults
 
 ---
  im/content/accountWizard.xul                                 | 2 +-
diff --git a/projects/instantbird/0008-Modify-IRC-defaults.patch b/projects/instantbird/0008-Modify-IRC-defaults.patch
index b98eb56..1dc5e0c 100644
--- a/projects/instantbird/0008-Modify-IRC-defaults.patch
+++ b/projects/instantbird/0008-Modify-IRC-defaults.patch
@@ -1,7 +1,7 @@
-From 7a406cd69822b331fed519f85cd80845d66fb054 Mon Sep 17 00:00:00 2001
+From 6024e2204e047b331726aa6e7d55f53d3f5b1f7a Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Mon, 10 Oct 2016 19:31:58 -0700
-Subject: [PATCH 08/21] Modify IRC defaults
+Subject: [PATCH 08/22] Modify IRC defaults
 
  * ctcp ping
 
diff --git a/projects/instantbird/0009-Do-not-set-default-XMPP-server.patch b/projects/instantbird/0009-Do-not-set-default-XMPP-server.patch
index c8cb5be..605c89d 100644
--- a/projects/instantbird/0009-Do-not-set-default-XMPP-server.patch
+++ b/projects/instantbird/0009-Do-not-set-default-XMPP-server.patch
@@ -1,7 +1,7 @@
-From 715152543027e0c8b2e0bf8a96777855ee6b244c Mon Sep 17 00:00:00 2001
+From e95333af34cbd0b25deb34eb30ad91a249f1273d Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Fri, 28 Jul 2017 12:11:57 -0400
-Subject: [PATCH 09/21] Do not set default XMPP server
+Subject: [PATCH 09/22] Do not set default XMPP server
 
 ---
  chat/protocols/xmpp/xmpp.js | 2 +-
diff --git a/projects/instantbird/0010-Modify-themes.patch b/projects/instantbird/0010-Modify-themes.patch
index 0514ae8..9158663 100644
--- a/projects/instantbird/0010-Modify-themes.patch
+++ b/projects/instantbird/0010-Modify-themes.patch
@@ -1,7 +1,7 @@
-From 1867c1d9e13691424ab7b688a3c9e2247b92196c Mon Sep 17 00:00:00 2001
+From 386c3799c372ceb41ff845e942d03d54cc8c05b9 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Mon, 10 Oct 2016 19:36:38 -0700
-Subject: [PATCH 10/21] Modify themes
+Subject: [PATCH 10/22] Modify themes
 
  * theme extension update
 
diff --git a/projects/instantbird/0011-Remove-logging-UI.patch b/projects/instantbird/0011-Remove-logging-UI.patch
index cbc228e..965a989 100644
--- a/projects/instantbird/0011-Remove-logging-UI.patch
+++ b/projects/instantbird/0011-Remove-logging-UI.patch
@@ -1,7 +1,7 @@
-From d8dc3bfb1ed8c540fa39f809ae2b9c908ecd94ea Mon Sep 17 00:00:00 2001
+From ae240a3b037a79565b22e2a4f2112769369485de Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Mon, 10 Oct 2016 19:50:48 -0700
-Subject: [PATCH 11/21] Remove logging UI
+Subject: [PATCH 11/22] Remove logging UI
 
 ---
  im/content/preferences/privacy.xul | 20 --------------------
diff --git a/projects/instantbird/0012-Cert-override.patch b/projects/instantbird/0012-Cert-override.patch
index cda9ffb..e681f36 100644
--- a/projects/instantbird/0012-Cert-override.patch
+++ b/projects/instantbird/0012-Cert-override.patch
@@ -1,7 +1,7 @@
-From 705b7d16542a4fa144adab92e22c44a04cf25f08 Mon Sep 17 00:00:00 2001
+From db82a34a94c888c4f5946a1c5741e64953145c3b Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Mon, 10 Oct 2016 19:56:46 -0700
-Subject: [PATCH 12/21] Cert override
+Subject: [PATCH 12/22] Cert override
 
 ---
  im/app/profile/cert_override.txt | 3 +++
diff --git a/projects/instantbird/0013-Display-all-traffic-over-Tor.patch b/projects/instantbird/0013-Display-all-traffic-over-Tor.patch
index 22dfbb2..79fb463 100644
--- a/projects/instantbird/0013-Display-all-traffic-over-Tor.patch
+++ b/projects/instantbird/0013-Display-all-traffic-over-Tor.patch
@@ -1,7 +1,7 @@
-From a8ae6f8acfcebacb97393ec3a51fc0687b883f2e Mon Sep 17 00:00:00 2001
+From e0797717c02828c4c3cb6ba909e2dd7b60191a53 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Mon, 10 Oct 2016 19:58:31 -0700
-Subject: [PATCH 13/21] Display all traffic over Tor
+Subject: [PATCH 13/22] Display all traffic over Tor
 
 ---
  im/content/accountWizard.xul                          | 2 ++
diff --git a/projects/instantbird/0014-Trac-17480-Content-sink.patch b/projects/instantbird/0014-Trac-17480-Content-sink.patch
index d43a581..f69e907 100644
--- a/projects/instantbird/0014-Trac-17480-Content-sink.patch
+++ b/projects/instantbird/0014-Trac-17480-Content-sink.patch
@@ -1,7 +1,7 @@
-From 8f39e0c901880909232c40929b6c4c16550a6f1c Mon Sep 17 00:00:00 2001
+From 41d1a9ba1370706db0e3ac0be00e696234e557a7 Mon Sep 17 00:00:00 2001
 From: Arlo Breault <arlolra at gmail.com>
 Date: Wed, 5 Oct 2016 11:09:25 -0700
-Subject: [PATCH 14/21] Trac 17480: Content sink
+Subject: [PATCH 14/22] Trac 17480: Content sink
 
 ---
  chat/modules/imContentSink.jsm     | 33 ++++++---------------------------
diff --git a/projects/instantbird/0015-SASL-ECDSA-NIST256P-CHALLENGE.patch b/projects/instantbird/0015-SASL-ECDSA-NIST256P-CHALLENGE.patch
index 8fa1068..39aab97 100644
--- a/projects/instantbird/0015-SASL-ECDSA-NIST256P-CHALLENGE.patch
+++ b/projects/instantbird/0015-SASL-ECDSA-NIST256P-CHALLENGE.patch
@@ -1,7 +1,7 @@
-From 0b9845e88a70553dffe3b0f180dc6aa78004b3f5 Mon Sep 17 00:00:00 2001
+From 6bdfde03b90d893e66697fab2edacf65189212fe Mon Sep 17 00:00:00 2001
 From: Arlo Breault <arlolra at gmail.com>
 Date: Sun, 2 Oct 2016 08:46:55 -0700
-Subject: [PATCH 15/21] SASL ECDSA-NIST256P-CHALLENGE
+Subject: [PATCH 15/22] SASL ECDSA-NIST256P-CHALLENGE
 
 ---
  chat/components/src/imAccounts.js |    1 +
diff --git a/projects/instantbird/0016-Bug-1321641-Use-built-in-functions-instead-of-an-svg.patch b/projects/instantbird/0016-Bug-1321641-Use-built-in-functions-instead-of-an-svg.patch
index caafea8..688d2ab 100644
--- a/projects/instantbird/0016-Bug-1321641-Use-built-in-functions-instead-of-an-svg.patch
+++ b/projects/instantbird/0016-Bug-1321641-Use-built-in-functions-instead-of-an-svg.patch
@@ -1,7 +1,7 @@
-From 55dd0aca298144d4cc7a79e00122eb428e9219de Mon Sep 17 00:00:00 2001
+From a0d55979dcd4049dc03fc512be8dc7880af6cbfe Mon Sep 17 00:00:00 2001
 From: Arlo Breault <arlolra at gmail.com>
 Date: Wed, 26 Jul 2017 17:14:19 -0400
-Subject: [PATCH 16/21] Bug 1321641 - Use built-in functions instead of an svg
+Subject: [PATCH 16/22] Bug 1321641 - Use built-in functions instead of an svg
  for bubbles filter
 
 ---
diff --git a/projects/instantbird/0017-Bug-1321420-Add-a-pref-to-disable-JavaScript-in-brow.patch b/projects/instantbird/0017-Bug-1321420-Add-a-pref-to-disable-JavaScript-in-brow.patch
index d279301..c1554fa 100644
--- a/projects/instantbird/0017-Bug-1321420-Add-a-pref-to-disable-JavaScript-in-brow.patch
+++ b/projects/instantbird/0017-Bug-1321420-Add-a-pref-to-disable-JavaScript-in-brow.patch
@@ -1,7 +1,7 @@
-From 5d57ad7cc87c2121ff23c9f8ab2f846e18218afe Mon Sep 17 00:00:00 2001
+From f2c58bf5598e72f827dc785586a1130a859c99a7 Mon Sep 17 00:00:00 2001
 From: Arlo Breault <arlolra at gmail.com>
 Date: Wed, 26 Jul 2017 16:35:33 -0400
-Subject: [PATCH 17/21] Bug 1321420 - Add a pref to disable JavaScript in
+Subject: [PATCH 17/22] Bug 1321420 - Add a pref to disable JavaScript in
  browser requests
 
 ---
diff --git a/projects/instantbird/0018-Trac-17517-Use-different-color-for-Add-Exception.patch b/projects/instantbird/0018-Trac-17517-Use-different-color-for-Add-Exception.patch
index fa97ec4..a9e330d 100644
--- a/projects/instantbird/0018-Trac-17517-Use-different-color-for-Add-Exception.patch
+++ b/projects/instantbird/0018-Trac-17517-Use-different-color-for-Add-Exception.patch
@@ -1,7 +1,7 @@
-From 57dfae7385e4121b3319697d0182d4784ff896f0 Mon Sep 17 00:00:00 2001
+From e3338fcbf8b93f4503332b1b6a5b19b8260e044f Mon Sep 17 00:00:00 2001
 From: Vu Quoc Huy <huyvq.c633 at gmail.com>
 Date: Wed, 26 Jul 2017 16:38:19 -0400
-Subject: [PATCH 18/21] Trac 17517 - Use different color for Add Exception
+Subject: [PATCH 18/22] Trac 17517 - Use different color for Add Exception
 
 ---
  chat/content/accounts.css | 3 +++
diff --git a/projects/instantbird/0019-Trac-21736-Hide-account-timestamp-from-message.patch b/projects/instantbird/0019-Trac-21736-Hide-account-timestamp-from-message.patch
index f17a910..cb76f05 100644
--- a/projects/instantbird/0019-Trac-21736-Hide-account-timestamp-from-message.patch
+++ b/projects/instantbird/0019-Trac-21736-Hide-account-timestamp-from-message.patch
@@ -1,7 +1,7 @@
-From 197a7c313b5cd6c65cb7dc20f10906399066e3d8 Mon Sep 17 00:00:00 2001
+From 630a3e4368eff760c8a8445f3743a15796facd19 Mon Sep 17 00:00:00 2001
 From: Vu Quoc Huy <huyvq.c633 at gmail.com>
 Date: Sun, 2 Apr 2017 13:07:09 -0400
-Subject: [PATCH 19/21] Trac 21736 - Hide account/timestamp from message
+Subject: [PATCH 19/22] Trac 21736 - Hide account/timestamp from message
 
 ---
  chat/modules/imThemes.jsm         | 9 ++++-----
diff --git a/projects/instantbird/0020-Update-allowed-duplicated-files-for-Windows-and-Linu.patch b/projects/instantbird/0020-Update-allowed-duplicated-files-for-Windows-and-Linu.patch
index 8e7fe05..510d3f1 100644
--- a/projects/instantbird/0020-Update-allowed-duplicated-files-for-Windows-and-Linu.patch
+++ b/projects/instantbird/0020-Update-allowed-duplicated-files-for-Windows-and-Linu.patch
@@ -1,7 +1,7 @@
-From 07ebd648ddf5b9002d8c7beffcaf19339c0fc2ef Mon Sep 17 00:00:00 2001
+From fdaaef5f4d89795c9b8e6ae9f3abe036708572ff Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Thu, 27 Jul 2017 15:16:54 -0400
-Subject: [PATCH 20/21] Update allowed duplicated files for Windows and Linux
+Subject: [PATCH 20/22] Update allowed duplicated files for Windows and Linux
  builds
 
 ---
diff --git a/projects/instantbird/0021-Bug-13855-Use-known-onions-for-XMPP-servers.patch b/projects/instantbird/0021-Bug-13855-Use-known-onions-for-XMPP-servers.patch
index f30d08d..9fe7a4f 100644
--- a/projects/instantbird/0021-Bug-13855-Use-known-onions-for-XMPP-servers.patch
+++ b/projects/instantbird/0021-Bug-13855-Use-known-onions-for-XMPP-servers.patch
@@ -1,7 +1,7 @@
-From 5dc03a0202fc8fefef5eb3956d417a36edc26010 Mon Sep 17 00:00:00 2001
+From 13d28415441e3c6b481d9eed98658a6ee16784bf Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Tue, 15 Aug 2017 16:40:33 -0400
-Subject: [PATCH 21/21] Bug 13855: Use known onions for XMPP servers
+Subject: [PATCH 21/22] Bug 13855: Use known onions for XMPP servers
 
 ---
  im/content/accountWizard.js                        | 42 +++++++++++++++++++++-
@@ -10,7 +10,7 @@ Subject: [PATCH 21/21] Bug 13855: Use known onions for XMPP servers
  3 files changed, 47 insertions(+), 3 deletions(-)
 
 diff --git a/im/content/accountWizard.js b/im/content/accountWizard.js
-index 2ca9ba3b0e..e6e895ec72 100644
+index 2ca9ba3b0e..7efedd5ed5 100644
 --- a/im/content/accountWizard.js
 +++ b/im/content/accountWizard.js
 @@ -7,6 +7,14 @@ Cu.import("resource:///modules/imServices.jsm");
@@ -128,7 +128,7 @@ index 73c9d93777..26b0bfa91c 100644
      <checkbox id="connectAutomatically" label= "&accountSummary.connectAutomatically.label;" checked="false"/>
    </wizardpage>
 diff --git a/im/locales/en-US/chrome/instantbird/accountWizard.properties b/im/locales/en-US/chrome/instantbird/accountWizard.properties
-index 83f807181f..60c00f9acb 100644
+index 83f807181f..7137dd2db4 100644
 --- a/im/locales/en-US/chrome/instantbird/accountWizard.properties
 +++ b/im/locales/en-US/chrome/instantbird/accountWizard.properties
 @@ -20,3 +20,5 @@ topProtocol.prpl-twitter.description=Stay up to date with your Twitter timeline
@@ -137,7 +137,6 @@ index 83f807181f..60c00f9acb 100644
  topProtocol.prpl-jabber.description=Chat using the open Jabber/XMPP protocol
 +
 +onionAddress.label=%S is %S's onion address.
-
 -- 
 2.14.1
 
diff --git a/projects/instantbird/0022-Bug-16606-Automatic-XMPP-accounts.patch b/projects/instantbird/0022-Bug-16606-Automatic-XMPP-accounts.patch
new file mode 100644
index 0000000..2f94dc3
--- /dev/null
+++ b/projects/instantbird/0022-Bug-16606-Automatic-XMPP-accounts.patch
@@ -0,0 +1,158 @@
+From 8a8329f53e3ae6eaaec67fb698a4ab6f0a50d1e6 Mon Sep 17 00:00:00 2001
+From: Sukhbir Singh <sukhbir at torproject.org>
+Date: Mon, 21 Aug 2017 23:00:07 -0400
+Subject: [PATCH 22/22] Bug 16606: Automatic XMPP accounts
+
+Add support for "temporary" XMPP accounts for which the username and
+password are randomly generated and in-band registration is performed
+automatically. This can also be used for throwaway accounts.
+---
+ chat/protocols/xmpp/xmpp-session.jsm               | 39 +++++++++++++---------
+ im/content/accountWizard.js                        | 34 +++++++++++++++++++
+ im/content/accountWizard.xul                       |  1 +
+ .../en-US/chrome/instantbird/accountWizard.dtd     |  1 +
+ 4 files changed, 59 insertions(+), 16 deletions(-)
+
+diff --git a/chat/protocols/xmpp/xmpp-session.jsm b/chat/protocols/xmpp/xmpp-session.jsm
+index 1c001064bd..b5b9fde11e 100644
+--- a/chat/protocols/xmpp/xmpp-session.jsm
++++ b/chat/protocols/xmpp/xmpp-session.jsm
+@@ -401,23 +401,30 @@ XMPPSession.prototype = {
+ 
+       this._account.reportConnecting(_("connection.gettingRegistration"));
+       let registerStanza = aStanza.getChildrenByNS(Stanza.NS.register)[0];
+-      // If we get registration data, show the form, else quit.
+-      if (registerStanza.getElement(["x"])) {
+-        this.nodes["username"] = this._jid.node;
+-        registerStanza.wrappedJSObject = registerStanza;
+-        let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"]
+-                   .getService(Ci.nsIWindowWatcher);
+-        let win = ww.openWindow(null, registerWindow, "",
+-                                "centerscreen,chrome,modal,minimizable=no", registerStanza);
+-      } else {
+-        this.onError(null, _("connection.error.noRegistrationSupport"));
+-        return;
+-      }
+ 
+-      // If the user cancelled the form, we should stop the registration.
+-      if (this.nodes["cancel"]) {
+-        this.onError(null, _("connection.error.registrationCancel"));
+-        return;
++      // For automatic XMPP registration, manually populate the fields.
++      if (this._account.getBool("tempRegister")) {
++            this.nodes["username"] = this._jid.node;
++            this.nodes["password"] = this._password;
++      }
++      else {
++        // If we get registration data, show the form, else quit.
++        if (registerStanza.getElement(["x"])) {
++          this.nodes["username"] = this._jid.node;
++          registerStanza.wrappedJSObject = registerStanza;
++          let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"]
++                     .getService(Ci.nsIWindowWatcher);
++          let win = ww.openWindow(null, registerWindow, "",
++                                  "centerscreen,chrome,modal,minimizable=no", registerStanza);
++        } else {
++          this.onError(null, _("connection.error.noRegistrationSupport"));
++          return;
++        }
++        // If the user cancelled the form, we should stop the registration.
++        if (this.nodes["cancel"]) {
++          this.onError(null, _("connection.error.registrationCancel"));
++          return;
++        }
+       }
+ 
+       let xml = '<?xml version="1.0"?>';
+diff --git a/im/content/accountWizard.js b/im/content/accountWizard.js
+index 7efedd5ed5..f68767f1c8 100644
+--- a/im/content/accountWizard.js
++++ b/im/content/accountWizard.js
+@@ -133,6 +133,10 @@ var accountWizard = {
+         this.onionAddress = "";
+       }
+     }
++    if (document.getElementById("tempXMPP").checked) {
++      document.getElementById("password").value = this.getRandomString(10);
++      document.getElementById("accountWizard").goTo("accountsummary");
++    }
+   },
+ 
+   showUsernamePage: function aw_showUsernamePage() {
+@@ -144,8 +148,10 @@ var accountWizard = {
+ 
+     if (this.proto.id == "prpl-jabber") {
+       document.getElementById("registerXMPP").hidden = false;
++      document.getElementById("tempXMPP").hidden = false;
+     } else {
+       document.getElementById("registerXMPP").hidden = true;
++      document.getElementById("tempXMPP").hidden = true;
+     }
+ 
+     let bundle = document.getElementById("accountsBundle");
+@@ -395,6 +401,7 @@ var accountWizard = {
+     //FIXME: newMailNotification
+ 
+     acc.setBool("register", document.getElementById("registerXMPP").checked);
++    acc.setBool("tempRegister", document.getElementById("tempXMPP").checked);
+ 
+     for (let i = 0; i < this.prefs.length; ++i) {
+       let option = this.prefs[i];
+@@ -499,6 +506,33 @@ var accountWizard = {
+     this.displayProxyDescription();
+   },
+ 
++  getRandomString: function aw_getRandomString(len) {
++    return Math.random().toString(36).substr(2, len);
++  },
++
++  createTempXMPP: function aw_createTempXMPP() {
++    let domain = document.getElementById("username-split-0");
++    let registerXMPP = document.getElementById("registerXMPP");
++    if (document.getElementById("tempXMPP").checked) {
++      domain.disabled = true;
++      domain.value = "jabber.otr.im";
++      registerXMPP.disabled = true;
++      registerXMPP.checked = true;
++      this.userNameBoxes[0].disabled = true;
++      this.userNameBoxes[0].value = this.getRandomString(7);
++      document.getElementById("accountWizard").canAdvance = true;
++    }
++    else {
++      domain.disabled = false;
++      domain.value = "";
++      registerXMPP.disabled = false;
++      registerXMPP.checked = false;
++      this.userNameBoxes[0].disabled = false;
++      this.userNameBoxes[0].value = "";
++      document.getElementById("accountWizard").canAdvance = false;
++    }
++  },
++
+   /* Check for correctness and set URL for the "Get more protocols..."-link
+    *  Stripped down code from preferences/themes.js
+    */
+diff --git a/im/content/accountWizard.xul b/im/content/accountWizard.xul
+index 26b0bfa91c..de7dafe6e1 100644
+--- a/im/content/accountWizard.xul
++++ b/im/content/accountWizard.xul
+@@ -69,6 +69,7 @@
+     <vbox id="userNameBox"/>
+     <separator/>
+     <description id="duplicateAccount" hidden="true">&accountUsernameDuplicate.label;</description>
++    <checkbox id="tempXMPP" label="&tempXMPP.label;" hidden="true" oncommand="accountWizard.createTempXMPP();"/>
+     <checkbox id="registerXMPP" label="&registerXMPP.label;" hidden="true" />
+   </wizardpage>
+ 
+diff --git a/im/locales/en-US/chrome/instantbird/accountWizard.dtd b/im/locales/en-US/chrome/instantbird/accountWizard.dtd
+index 6b49c84fad..de7fe8ed11 100644
+--- a/im/locales/en-US/chrome/instantbird/accountWizard.dtd
++++ b/im/locales/en-US/chrome/instantbird/accountWizard.dtd
+@@ -34,3 +34,4 @@
+ <!ENTITY accountSummary.connectAutomatically.label "Connect this account automatically.">
+ 
+ <!ENTITY registerXMPP.label "Create this new account on the server">
++<!ENTITY tempXMPP.label "Create a temporary account automatically">
+-- 
+2.14.1
+
diff --git a/projects/instantbird/config b/projects/instantbird/config
index 5e06e81..b9e5e42 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -70,6 +70,7 @@ input_files:
   - filename: 0019-Trac-21736-Hide-account-timestamp-from-message.patch
   - filename: 0020-Update-allowed-duplicated-files-for-Windows-and-Linu.patch
   - filename: 0021-Bug-13855-Use-known-onions-for-XMPP-servers.patch
+  - filename: 0022-Bug-16606-Automatic-XMPP-accounts.patch
   - filename: mozconfig-common
   - filename: 'mozconfig-[% c("var/osname") %]'
     name: mozconfig





More information about the tor-commits mailing list