changeset 63c8ab421f3a in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=63c8ab421f3a
description: [Pablo Mazzini] ask passphrase to user when using non-sasl 
authentication

diffstat:

 src/common/xmpp/auth_nb.py |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 61fa1268d4a2 -r 63c8ab421f3a src/common/xmpp/auth_nb.py
--- a/src/common/xmpp/auth_nb.py        Sat Jan 07 12:00:04 2012 +0400
+++ b/src/common/xmpp/auth_nb.py        Sat Jan 07 15:41:53 2012 +0100
@@ -567,8 +567,19 @@
         else:
             log.warn("Secure methods unsupported, performing plain text \
                 authentication")
-            query.setTagData('password', self.password)
             self._method = 'plain'
+            self._owner._caller.get_password(self._on_password, self._method)
+            return
+        resp = self.owner.Dispatcher.SendAndWaitForResponse(iq,
+            func=self._on_auth)
+
+    def _on_password(self, password):
+        self.password = '' if password is None else password
+        iq=Iq('set', NS_AUTH)
+        query = iq.getTag('query')
+        query.setTagData('username', self.user)
+        query.setTagData('resource', self.resource)
+        query.setTagData('password', self.password)
         resp = self.owner.Dispatcher.SendAndWaitForResponse(iq,
             func=self._on_auth)
 
_______________________________________________
Commits mailing list
Commits@gajim.org
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to