diff options
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r-- | toolkit/mozapps/extensions/internal/XPIProvider.jsm | 24 | ||||
-rw-r--r-- | toolkit/mozapps/preferences/changemp.js | 12 | ||||
-rw-r--r-- | toolkit/mozapps/preferences/changemp.xul | 7 |
3 files changed, 22 insertions, 21 deletions
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 2c5e3dfa7..72a460e4a 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -1931,12 +1931,10 @@ this.XPIProvider = { let chan; try { - chan = Services.io.newChannelFromURI2(aURI, - null, // aLoadingNode - Services.scriptSecurityManager.getSystemPrincipal(), - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_OTHER); + chan = NetUtil.newChannel({ + uri: aURI, + loadUsingSystemPrincipal: true + }); } catch (ex) { return null; @@ -5456,21 +5454,17 @@ AddonInstall.prototype = { let requireBuiltIn = Preferences.get(PREF_INSTALL_REQUIREBUILTINCERTS, true); this.badCertHandler = new BadCertHandler(!requireBuiltIn); - this.channel = NetUtil.newChannel2(this.sourceURI, - null, - null, - null, // aLoadingNode - Services.scriptSecurityManager.getSystemPrincipal(), - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_OTHER); + this.channel = NetUtil.newChannel({ + uri: this.sourceURI, + loadUsingSystemPrincipal: true + }); this.channel.notificationCallbacks = this; if (this.channel instanceof Ci.nsIHttpChannel) { this.channel.setRequestHeader("Moz-XPI-Update", "1", true); if (this.channel instanceof Ci.nsIHttpChannelInternal) this.channel.forceAllowThirdPartyCookie = true; } - this.channel.asyncOpen(listener, null); + this.channel.asyncOpen2(listener); Services.obs.addObserver(this, "network:offline-about-to-go-offline", false); } diff --git a/toolkit/mozapps/preferences/changemp.js b/toolkit/mozapps/preferences/changemp.js index 82dd20128..71664b3e1 100644 --- a/toolkit/mozapps/preferences/changemp.js +++ b/toolkit/mozapps/preferences/changemp.js @@ -167,8 +167,8 @@ function setPasswordStrength() // length of the password var pwlength=(pw.length); - if (pwlength>5) - pwlength=5; + if (pwlength>10) + pwlength=10; // use of numbers in the password @@ -190,7 +190,7 @@ function setPasswordStrength() upper=3; - var pwstrength=((pwlength*10)-20) + (numeric*10) + (numsymbols*15) + (upper*10); + var pwstrength=((pwlength*5)-20) + (numeric*10) + (numsymbols*15) + (upper*10); // make sure we're give a value between 0 and 100 if ( pwstrength < 0 ) { @@ -227,6 +227,12 @@ function checkPasswords() } } + // Never accept short passwords < 8 chars + if (pw1.length < 8) { + ok.setAttribute("disabled", "true"); + return; + } + if (pw1 == pw2) { ok.setAttribute("disabled", "false"); } else diff --git a/toolkit/mozapps/preferences/changemp.xul b/toolkit/mozapps/preferences/changemp.xul index 14d02295e..b316fa42b 100644 --- a/toolkit/mozapps/preferences/changemp.xul +++ b/toolkit/mozapps/preferences/changemp.xul @@ -34,7 +34,7 @@ <rows> <row> <label control="oldpw">&setPassword.oldPassword.label;</label> - <textbox id="oldpw" type="password"/> + <textbox id="oldpw" type="password" size="18"/> <!-- This textbox is inserted as a workaround to the fact that making the 'type' & 'disabled' property of the 'oldpw' textbox toggle between ['password' & 'false'] and ['text' & 'true'] - as would be necessary if the menu has more @@ -46,12 +46,13 @@ </row> <row> <label control="pw1">&setPassword.newPassword.label;</label> - <textbox id="pw1" type="password" + <textbox id="pw1" type="password" size="18" oninput="setPasswordStrength(); checkPasswords();"/> </row> <row> <label control="pw2">&setPassword.reenterPassword.label;</label> - <textbox id="pw2" type="password" oninput="checkPasswords();"/> + <textbox id="pw2" type="password" size="18" + oninput="checkPasswords();"/> </row> </rows> </grid> |