From 2fc85ad7d109ca4304d1fb1515b7087a1bb2ae3e Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 27 Sep 2016 19:28:28 -0500 Subject: [feature]Add change password command - Resolves: #8487 --- src/leap/bitmask/core/mail_services.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/leap/bitmask/core/mail_services.py') diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py index 3de4df2..e19b719 100644 --- a/src/leap/bitmask/core/mail_services.py +++ b/src/leap/bitmask/core/mail_services.py @@ -210,6 +210,17 @@ class SoledadService(HookableService): container.add_instance( userid, password, uuid=uuid, token=token) + def hook_on_passphrase_change(self, **kw): + # TODO: if bitmask stops before this hook being executed bonafide and + # soledad will end up with different passwords + # https://leap.se/code/issues/8489 + userid = kw['username'] + password = kw['password'] + soledad = self._container.get_instance(userid) + if soledad is not None: + log.msg("Change soledad passphrase for %s" % userid) + soledad.change_passphrase(unicode(password)) + class KeymanagerContainer(Container): -- cgit v1.2.3