plugins misc_account, misc_smtp: update the plugins that deal with passwords

This commit is contained in:
souliane 2014-05-12 17:51:38 +02:00
commit f3b0b52014

View file

@ -180,10 +180,10 @@ class SatProfileCredentialChecker(object):
profiles = self.host.memory.getProfilesList()
if not credentials.username in profiles:
return defer.fail(cred_error.UnauthorizedLogin())
password = self.host.memory.getParamA("Password", "Connection", profile_key=credentials.username)
return defer.maybeDeferred(credentials.checkPassword,
password).addCallback(self._cbPasswordMatch,
credentials.username)
d = self.host.memory.asyncGetParamA("Password", "Connection", profile_key=credentials.username)
d.addCallback(credentials.checkPassword)
d.addCallback(self._cbPasswordMatch, credentials.username)
return d
class SmtpServerFactory(smtp.SMTPFactory):