Bug 620952 - Trim whitespace from sync account/password [r=vingtetun]
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 28 Dec 2010 07:31:46 -0800
changeset 67169 8433e9b3d8866a59cb016b6eb3b0040f026662f9
parent 67168 930648b96e3fac43eb29fd241084a2dab413791b
child 67170 4cb466382b650ae6411fccd170802f66aa1a585c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvingtetun
bugs620952
Bug 620952 - Trim whitespace from sync account/password [r=vingtetun]
mobile/chrome/content/sync.js
--- a/mobile/chrome/content/sync.js
+++ b/mobile/chrome/content/sync.js
@@ -157,20 +157,20 @@ let WeaveGlue = {
   },
 
   close: function close() {
     let scrollbox = document.getElementById("syncsetup-scrollbox").boxObject.QueryInterface(Ci.nsIScrollBoxObject);
     scrollbox.scrollTo(0, 0);
 
     // Save current setup data
     this.setupData = {
-      account: this._elements.account.value,
-      password: this._elements.password.value,
-      synckey: Weave.Utils.normalizePassphrase(this._elements.synckey.value),
-      serverURL: this._validateServer(this._elements.customserver.value)
+      account: this._elements.account.value.trim(),
+      password: this._elements.password.value.trim(),
+      synckey: Weave.Utils.normalizePassphrase(this._elements.synckey.value.trim()),
+      serverURL: this._validateServer(this._elements.customserver.value.trim())
     };
 
     // Clear the UI so it's ready for next time
     this._elements.account.value = "";
     this._elements.password.value = "";
     this._elements.synckey.value = "";
     this._elements.usecustomserver.checked = false;
     this._elements.customserver.disable = true;