Unbreak getting password from UI

Commit 9239a2d326 broke getting the password from the UI. This
unbreaks the change and adds some extended documentation and cleanups in
the functino en-passent.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian
2010-12-13 11:45:42 -06:00
committed by Nicolas Sebrecht
parent 62712cbe15
commit b853b58578
2 changed files with 23 additions and 9 deletions

View File

@ -176,7 +176,7 @@ class IMAPServer:
challenge = response.strip()
ui.debug('imap', 'md5handler: got challenge %s' % challenge)
passwd = self.repos.getpassword()
passwd = self.getpassword()
retval = self.username + ' ' + hmac.new(passwd, challenge).hexdigest()
ui.debug('imap', 'md5handler: returning %s' % retval)
return retval
@ -184,7 +184,7 @@ class IMAPServer:
def plainauth(self, imapobj):
UIBase.getglobalui().debug('imap',
'Attempting plain authentication')
imapobj.login(self.username, self.repos.getpassword())
imapobj.login(self.username, self.getpassword())
def gssauth(self, response):
data = base64.b64encode(response)