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

[tor-commits] [tor-messenger-build/master] Prevent auto login at startup



commit 4f9934fae3244b99262d45ec8039e12ab0517926
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Mon Nov 16 20:45:14 2015 -0800

    Prevent auto login at startup
    
     * Trac 16489
---
 ChangeLog                             |    1 +
 projects/instantbird/config           |    1 +
 projects/instantbird/trac-16489.patch |  158 +++++++++++++++++++++++++++++++++
 3 files changed, 160 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index d8c16df..5615014 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ Tor Messenger 0.1.0b4 --
      * Bug 17539: Pass username when interpolating resent string
      * Bug 15179: Add an OTR Preferences item to the Tools menu
    * Use the FIREFOX_42_0_RELEASE tag on mozilla-release
+   * Bug 16489: Prevent automatic logins at startup
  * Mac
    * Bug 16476: Themes preference is positioned incorrectly
    * Bug 17456: Hang in preferences menu
diff --git a/projects/instantbird/config b/projects/instantbird/config
index 638339d..22c1bb3 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -72,6 +72,7 @@ input_files:
   - filename: xmppRegister.xul
   - filename: xmpp-gtalk-resource.patch
   - filename: trac-17552.patch
+  - filename: trac-16489.patch
   - filename: version.patch
   - filename: search-context-menu.patch
   - filename: search-preferences-xul.patch
diff --git a/projects/instantbird/trac-16489.patch b/projects/instantbird/trac-16489.patch
new file mode 100644
index 0000000..579b286
--- /dev/null
+++ b/projects/instantbird/trac-16489.patch
@@ -0,0 +1,158 @@
+# HG changeset patch
+# User Arlo Breault <arlolra@xxxxxxxxx>
+# Date 1447735073 28800
+#      Mon Nov 16 20:37:53 2015 -0800
+# Node ID dd2cd9b18e3a356e227d02beec052f8591509cec
+# Parent  073468887b0faecb810a6e4463a2806924fead81
+trac 16489 - autologin
+
+diff --git a/chat/components/src/imAccounts.js b/chat/components/src/imAccounts.js
+--- a/chat/components/src/imAccounts.js
++++ b/chat/components/src/imAccounts.js
+@@ -583,17 +583,17 @@ imAccount.prototype = {
+     if (aException.result != Components.results.NS_ERROR_ABORT)
+       throw aException;
+ 
+     gUserCanceledMasterPasswordPrompt = true;
+     executeSoon(function () { gUserCanceledMasterPasswordPrompt = false; });
+   },
+ 
+   get autoLogin() {
+-    let autoLogin = true;
++    let autoLogin = false;
+     try {
+       autoLogin = this.prefBranch.getBoolPref(kPrefAccountAutoLogin);
+     } catch (e) { }
+     return autoLogin;
+   },
+   set autoLogin(val) {
+     this.prefBranch.setBoolPref(kPrefAccountAutoLogin, val);
+     SavePrefTimer.initTimer();
+diff --git a/im/content/account.xml b/im/content/account.xml
+--- a/im/content/account.xml
++++ b/im/content/account.xml
+@@ -36,20 +36,16 @@
+             <xul:description class="error" anonid="error"/>
+             <xul:description class="error" anonid="reconnect"/>
+             <xul:label class="addException text-link"
+                        onclick="gAccountManager.addException()"
+                        value="&certmgr.addException.label;"
+                        accesskey="&certmgr.addException.accesskey;"/>
+             <xul:spacer flex="1"/>
+           </xul:vbox>
+-          <xul:checkbox label="&account.autoSignOn.label;" dir="reverse"
+-                        xbl:inherits="checked=autologin" class="autoSignOn"
+-                        accesskey="&account.autoSignOn.accesskey;"
+-                        oncommand="gAccountManager.autologin()"/>
+         </xul:hbox>
+         <xul:hbox flex="1" class="account-buttons" anonid="buttons"
+                   xbl:inherits="autologin"/>
+       </xul:vbox>
+     </content>
+     <implementation>
+       <method name="build">
+         <parameter name="aAccount"/>
+diff --git a/im/content/accountWizard.js b/im/content/accountWizard.js
+--- a/im/content/accountWizard.js
++++ b/im/content/accountWizard.js
+@@ -430,32 +430,23 @@ var accountWizard = {
+       case opt.typeString:
+       case opt.typeList:
+         acc.setString(option.name, option.value);
+         break;
+       default:
+         throw "unknown type";
+       }
+     }
+-    let autologin = this.getValue("connectAutomatically");
+-    acc.autoLogin = autologin;
++    acc.autoLogin = false;
+ 
+     if (this.proto.usePurpleProxy)
+       acc.proxyInfo = this.proxy;
+ 
+     acc.save();
+ 
+-    try {
+-      if (autologin)
+-        acc.connect();
+-    } catch (e) {
+-      // If the connection fails (for example if we are currently in
+-      // offline mode), we still want to close the account wizard
+-    }
+-
+     if (window.opener) {
+       let am = window.opener.gAccountManager;
+       if (am)
+         am.selectAccount(acc.id);
+     }
+ 
+     return true;
+   },
+diff --git a/im/content/accountWizard.xul b/im/content/accountWizard.xul
+--- a/im/content/accountWizard.xul
++++ b/im/content/accountWizard.xul
+@@ -132,13 +132,11 @@
+     <separator/>
+     <grid id="summarygrid" flex="1">
+       <columns>
+         <column/>
+         <column flex="1"/>
+       </columns>
+       <rows id="summaryRows"/>
+     </grid>
+-    <separator/>
+-    <checkbox id="connectAutomatically" label= "&accountSummary.connectAutomatically.label;" checked="true"/>
+   </wizardpage>
+ 
+ </wizard>
+diff --git a/im/content/preferences/main.xul b/im/content/preferences/main.xul
+--- a/im/content/preferences/main.xul
++++ b/im/content/preferences/main.xul
+@@ -15,46 +15,28 @@
+ <overlay id="MainPaneOverlay"
+          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";>
+ 
+   <prefpane id="paneMain" onpaneload="gMainPane.init();">
+ 
+     <script type="application/javascript" src="chrome://instantbird/content/preferences/main.js"/>
+ 
+     <preferences id="mainPreferences">
+-      <preference id="messenger.startup.action"     name="messenger.startup.action"     type="int"/>
+       <preference id="messenger.options.playSounds.blist"   name="messenger.options.playSounds.blist"   type="bool"/>
+       <preference id="messenger.options.playSounds.message" name="messenger.options.playSounds.message" type="bool"/>
+       <preference id="messenger.options.getAttentionOnNewMessages" name="messenger.options.getAttentionOnNewMessages" type="bool"/>
+ #ifdef XP_MACOSX
+       <preference id="messenger.options.showUnreadCountInDock" name="messenger.options.showUnreadCountInDock" type="bool"/>
+ #else
+       <preference id="extensions.mintrayr.alwaysShowTrayIcon" name="extensions.mintrayr.alwaysShowTrayIcon" type="bool"/>
+       <preference id="extensions.mintrayr.minimizeon" name="extensions.mintrayr.minimizeon" type="int"/>
+ #endif
+       <preference id="messenger.options.notifyOfNewMessages" name="messenger.options.notifyOfNewMessages" type="bool"/>
+     </preferences>
+ 
+-    <!-- Startup -->
+-    <groupbox id="startupGroup">
+-      <caption label="&startup.label;"/>
+-
+-      <hbox align="center">
+-        <label value="&startupAction.label;" accesskey="&startupAction.accesskey;"
+-               control="messengerStartupAction"/>
+-        <menulist id="messengerStartupAction" preference="messenger.startup.action">
+-          <menupopup>
+-            <menuitem label="&startupOffline.label;"     value="0"/>
+-            <menuitem label="&startupConnectAuto.label;" value="1"/>
+-          </menupopup>
+-        </menulist>
+-      </hbox>
+-    </groupbox>
+-
+-
+     <groupbox id="accountsMgrGroup" orient="horizontal" align="center">
+       <caption label="&accountsMgr.label;"/>
+ 
+       <description control="manageAccounts"
+ #ifdef XP_WIN
+                    flex="1">&manageAccountsDescWin.label;</description>
+ #else
+                    flex="1">&manageAccountsDescUnix2.label;</description>

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