зеркало из https://github.com/mozilla/gecko-dev.git
Make "Log Out" clear all HTTP auth sessions as well as expiring the master password b=55181 p=vhaarr@firefox.no r=me sr=darin
This commit is contained in:
Родитель
bca91b2417
Коммит
a01e4f8ff5
|
@ -45,11 +45,17 @@
|
|||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
|
||||
// expire master password
|
||||
function walletPasswordExpire() {
|
||||
var wallet = Components.classes['@mozilla.org/wallet/wallet-service;1'];
|
||||
wallet = wallet.getService();
|
||||
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
|
||||
// First clears the HTTP auth, then the Wallet
|
||||
function expireHTTPAuthAndWallet() {
|
||||
// Queries the HTTP Auth Manager and clears all sessions
|
||||
Components.classes['@mozilla.org/network/http-auth-manager;1']
|
||||
.getService(Components.interfaces.nsIHttpAuthManager)
|
||||
.clearAll();
|
||||
|
||||
// Expires the master password
|
||||
var wallet =
|
||||
Components.classes['@mozilla.org/wallet/wallet-service;1']
|
||||
.getService(Components.interfaces.nsIWalletService);
|
||||
var strings = document.getElementById("menu_passwordManager");
|
||||
|
||||
if (wallet.WALLET_ExpirePassword()) {
|
||||
|
@ -79,7 +85,7 @@
|
|||
<menupopup>
|
||||
<menuitem label="&walletExpirePasswordCmd.label;"
|
||||
accesskey="&walletExpirePasswordCmd.accesskey;"
|
||||
oncommand="walletPasswordExpire();"/>
|
||||
oncommand="expireHTTPAuthAndWallet();"/>
|
||||
<menuitem label="&walletDisplaySignonsCmd.label;"
|
||||
accesskey="&walletDisplaySignonsCmd.accesskey;"
|
||||
oncommand="walletPasswordDialog();"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче