Clear password cache on hide.

This commit is contained in:
Dain Nilsson 2015-11-16 13:12:17 +01:00
parent 3ca4765ec5
commit 20c1c695de
4 changed files with 9 additions and 0 deletions

2
NEWS
View File

@ -1,6 +1,8 @@
* Version 2.2.2 (unreleased)
** Re-schedule timer each time period based on system time to prevent Qt timer
drift.
** Clear password memory cache on minimize to prevent accidentally leaving the
YubiKey unlocked unattended.
* Version 2.2.1 (released 2015-08-20)
** Bugfix release: Fix adding credentials via the UI.

View File

@ -187,6 +187,7 @@ class YubiOathApplication(qt.Application):
event.accept()
def _on_hide(self, event):
self._controller.forget_passwords()
event.accept()
def _on_closed(self, event):

View File

@ -420,3 +420,6 @@ class GuiController(QtCore.QObject, Controller):
if self.unlock(dev):
key = super(GuiController, self).set_password(dev, password)
self._keystore.put(dev.id, key, remember)
def forget_passwords(self):
self._keystore.forget()

View File

@ -50,3 +50,6 @@ class Keystore(object):
if id in self._data:
del self._data[id]
self._store.delete(id)
def forget(self):
self._data = {}