Bug #255451 --> More refinements for master password.

Leave off by default like Firefox.

Add a seamonkey like checkbox for encrypting vs. obscuring for using the master password
to lock saved passwords.


git-svn-id: svn://10.0.0.236/trunk@160891 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scott%scott-macgregor.org 2004-08-18 05:17:47 +00:00
parent deaa2b2e09
commit 27117eac91
3 changed files with 32 additions and 2 deletions

View File

@ -288,7 +288,7 @@ pref("javascript.options.showInConsole", true);
pref("network.enableIDN", false); // Turn on/off IDN (Internationalized Domain Name) resolution
pref("wallet.captureForms", true);
pref("wallet.enabled", true);
pref("wallet.crypto", true); // needs to be enabled for the master password to work
pref("wallet.crypto", false);
pref("wallet.crypto.autocompleteoverride", false); // Ignore 'autocomplete=off' - available only when wallet.crypto is enabled.
pref("wallet.namePanel.hide", false);
pref("wallet.addressPanel.hide", false);

View File

@ -13,6 +13,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&dialog.title;"
onload="onLoad();"
style="width: 40em;"
ondialogaccept="return onAccept();">
<script type="application/x-javascript" src="chrome://pippki/content/pref-masterpass.js"/>
@ -22,6 +23,9 @@
function onLoad()
{
var el = document.getElementById('encryptEnabled');
el.checked = gPrefService.getBoolPref(el.getAttribute("prefstring"));
var el = document.getElementById('passwordTimeout');
el.setAttribute("value", gPrefService.getIntPref(el.getAttribute("prefstring")) );
@ -33,19 +37,40 @@
function onAccept()
{
var el = document.getElementById('encryptEnabled');
gPrefService.setBoolPref(el.getAttribute("prefstring"), el.checked);
var el = document.getElementById('passwordAskTimes');
gPrefService.setIntPref(el.getAttribute("prefstring"), parseInt(el.value));
var el = document.getElementById('passwordTimeout');
gPrefService.setIntPref(el.getAttribute("prefstring"), parseInt(el.value) );
}
function initReencryptCallback()
{
var wallet = Components.classes['@mozilla.org/wallet/wallet-service;1'];
wallet = wallet.getService();
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
wallet.WALLET_InitReencryptCallback(window);
}
]]>
</script>
<groupbox>
<caption label="&encryptHeader.label;"/>
<description width="1">&encryptDescription.label;</description>
<vbox align="start">
<checkbox id="encryptEnabled" label="&encryptEnabled.label;" accesskey="&encryptEnabled.accesskey;"
prefstring="wallet.crypto"
oncommand="initReencryptCallback();"/>
</vbox>
</groupbox>
<!-- Change Password -->
<groupbox>
<caption label="&changepassword.label;"/>
<description wdith="1">&changepassword.text;</description>
<description width="1">&changepassword.text;</description>
<hbox align="center">
<button label="&changepassword.button;"
oncommand="ChangePW();"

View File

@ -1,5 +1,10 @@
<!ENTITY dialog.title "Master Password">
<!ENTITY encryptHeader.label "Encrypting versus Obscuring">
<!ENTITY encryptDescription.label "Saved e-mail passwords can be encrypted using a master password to prevent the data from being read by an intruder.">
<!ENTITY encryptEnabled.label "Use a master password to encrypt stored passwords">
<!ENTITY encryptEnabled.accesskey "m">
<!ENTITY managepassword.label "Master Password Timeout">
<!ENTITY managepassword.text "&brandShortName; will ask for your master password:">
<!ENTITY managepassword.askfirsttime "The first time it is needed">