gajim: update changelog
changeset 792ee48ab707 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=792ee48ab707 description: update changelog diffstat: ChangeLog | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r b1724179fb73 -r 792ee48ab707 ChangeLog --- a/ChangeLog Sat Mar 15 09:53:20 2014 +0100 +++ b/ChangeLog Sat Mar 15 09:53:48 2014 +0100 @@ -3,6 +3,7 @@ * Improve File transfer support by adding Jingle file transfer * use external python-nbxmpp library * Improve audio / Video calls and add screensharing feature + * Support audio under windows * Support systemd-logind * Support XEP-0308 Last message correction * Support XEP-0224 Attention ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: py2 -> py3
changeset a46891c400bc in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=a46891c400bc description: py2 -> py3 diffstat: src/plugins/pluginmanager.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (30 lines): diff -r b126752c304b -r a46891c400bc src/plugins/pluginmanager.py --- a/src/plugins/pluginmanager.py Sun Mar 09 10:19:24 2014 +0100 +++ b/src/plugins/pluginmanager.py Thu Mar 27 12:42:19 2014 +0100 @@ -257,7 +257,7 @@ gui_extpoint_name]: try: handlers[0](*args) -except Exception, e: +except Exception as e: log.warning('Error executing %s', handlers[0], exc_info=True) @@ -332,7 +332,7 @@ if handler: try: handler(*gui_extension_point_args) -except Exception, e: +except Exception as e: log.warning('Error executing %s', handler, exc_info=True) @@ -367,7 +367,7 @@ if handler: try: handler(*gui_extension_point_args) -except Exception, e: +except Exception as e: log.warning('Error executing %s', handler, exc_info=True) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: ignore attention (XEP-224) when messages is delayed
changeset a9d3aa50bddd in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=a9d3aa50bddd description: ignore attention (XEP-224) when messages is delayed diffstat: src/common/connection_handlers_events.py | 5 - src/common/protocol/bytestream.py| 3 +++ 2 files changed, 7 insertions(+), 1 deletions(-) diffs (28 lines): diff -r 8898f392acb2 -r a9d3aa50bddd src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Sun Mar 09 10:25:26 2014 +0100 +++ b/src/common/connection_handlers_events.py Mon Mar 10 21:47:21 2014 +0100 @@ -1311,7 +1311,10 @@ self.displaymarking = self.seclabel.getTag('displaymarking') if self.stanza.getTag('attention', namespace=nbxmpp.NS_ATTENTION): -self.attention = True +delayed = self.stanza.getTag('x', namespace=nbxmpp.NS_DELAY) is not\ +None +if not delayed: +self.attention = True self.form_node = self.stanza.getTag('x', namespace=nbxmpp.NS_DATA) diff -r 8898f392acb2 -r a9d3aa50bddd src/common/protocol/bytestream.py --- a/src/common/protocol/bytestream.py Sun Mar 09 10:25:26 2014 +0100 +++ b/src/common/protocol/bytestream.py Mon Mar 10 21:47:21 2014 +0100 @@ -468,6 +468,9 @@ if listener: self._add_streamhosts_to_query(query, sender, ext_port, [ext_ip]) +else: +self._add_streamhosts_to_query(query, file_props.sender, +ext_port, [ext_ip]) self.connection.send(iq) cleanup_gupnp() ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: make audio work under windows
changeset 8898f392acb2 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=8898f392acb2 description: make audio work under windows diffstat: gajim.nsi | 24 +++- setup_win32.py | 5 + src/common/gajim.py | 4 src/gajim.py| 6 ++ 4 files changed, 34 insertions(+), 5 deletions(-) diffs (118 lines): diff -r a46891c400bc -r 8898f392acb2 gajim.nsi --- a/gajim.nsi Thu Mar 27 12:42:19 2014 +0100 +++ b/gajim.nsi Sun Mar 09 10:25:26 2014 +0100 @@ -164,22 +164,29 @@ File "bin\atk.pyd" File "bin\bz2.pyd" File "bin\cairo._cairo.pyd" - File "bin\Crypto.Cipher.AES.pyd" - File "bin\Crypto.Hash.SHA256.pyd" + File "bin\Crypto.Cipher._AES.pyd" +File "bin\Crypto.Cipher._DES.pyd" +File "bin\Crypto.Cipher._DES3.pyd" + File "bin\Crypto.Hash._SHA256.pyd" File "bin\Crypto.Random.OSRNG.winrandom.pyd" File "bin\Crypto.Util._counter.pyd" File "bin\Crypto.Util.strxor.pyd" +File "bin\farstream.pyd" File "bin\gajim.exe" File "bin\gio._gio.pyd" File "bin\glib._glib.pyd" File "bin\gobject._gobject.pyd" File "bin\goocanvas.pyd" +File "bin\gst._gst.pyd" +File "bin\gst.interfaces.pyd" File "bin\gtk._gtk.pyd" File "bin\history_manager.exe" File "bin\OpenSSL.crypto.pyd" File "bin\libeay32.dll" File "bin\libgoocanvas-3.dll" File "bin\library.zip" +File "bin\libxml2mod.pyd" +File "bin\libxmlmods.libxml2mod.pyd" File "bin\pangocairo.pyd" File "bin\pango.pyd" File "bin\pycurl.pyd" @@ -544,20 +551,27 @@ Delete "$INSTDIR\bin\atk.pyd" Delete "$INSTDIR\bin\bz2.pyd" Delete "$INSTDIR\bin\cairo._cairo.pyd" - Delete "$INSTDIR\bin\Crypto.Cipher.AES.pyd" - Delete "$INSTDIR\bin\Crypto.Hash.SHA256.pyd" + Delete "$INSTDIR\bin\Crypto.Cipher._AES.pyd" +Delete "$INSTDIR\bin\Crypto.Cipher._DES.pyd" +Delete "$INSTDIR\bin\Crypto.Cipher._DES3.pyd" + Delete "$INSTDIR\bin\Crypto.Hash._SHA256.pyd" Delete "$INSTDIR\bin\Crypto.Random.OSRNG.winrandom.pyd" Delete "$INSTDIR\bin\Crypto.Util._counter.pyd" - Delete "$INSTDIR\bin\gajim.exe" +Delete "$INSTDIR\bin\farstream.pyd" +Delete "$INSTDIR\bin\gajim.exe" Delete "$INSTDIR\bin\gio._gio.pyd" Delete "$INSTDIR\bin\glib._glib.pyd" Delete "$INSTDIR\bin\gobject._gobject.pyd" Delete "$INSTDIR\bin\goocanvas.pyd" + Delete "$INSTDIR\bin\gst._gst.pyd" +Delete "$INSTDIR\bin\gst.interfaces.pyd" Delete "$INSTDIR\bin\gtk._gtk.pyd" Delete "$INSTDIR\bin\history_manager.exe" Delete "$INSTDIR\bin\libeay32.dll" Delete "$INSTDIR\bin\libgoocanvas-3.dll" Delete "$INSTDIR\bin\library.zip" + Delete "$INSTDIR\bin\libxml2mod.pyd" +Delete "$INSTDIR\bin\libxmlmods.libxml2mod.pyd" Delete "$INSTDIR\bin\OpenSSL.crypto.pyd" Delete "$INSTDIR\bin\OpenSSL.rand.pyd" Delete "$INSTDIR\bin\OpenSSL.SSL.pyd" diff -r a46891c400bc -r 8898f392acb2 setup_win32.py --- a/setup_win32.pyThu Mar 27 12:42:19 2014 +0100 +++ b/setup_win32.pySun Mar 09 10:25:26 2014 +0100 @@ -44,6 +44,11 @@ 'libgtk-win32-2.0-0.dll', 'libpango-1.0-0.dll', 'libpangowin32-1.0-0.dll', 'libcairo-2.dll', 'libpangocairo-1.0-0.dll', 'libpangoft2-1.0-0.dll', +'libfarstream-0.1-0.dll', 'libgcc_s_dw2-1.dll', +'libgstbase-0.10-0.dll', 'libgstcontroller-0.10-0.dll', +'libgstdataprotocol-0.10-0.dll', 'libgstinterfaces-0.10-0.dll', +'libgstnet-0.10-0.dll', 'libgstreamer-0.10-0.dll', +'libiconv-2.dll', 'libxml2.dll', 'libxml2-2.dll', ], } } diff -r a46891c400bc -r 8898f392acb2 src/common/gajim.py --- a/src/common/gajim.py Thu Mar 27 12:42:19 2014 +0100 +++ b/src/common/gajim.py Sun Mar 09 10:25:26 2014 +0100 @@ -28,6 +28,7 @@ ## import sys +import os import logging import locale @@ -184,6 +185,9 @@ HAVE_FARSTREAM = True try: +if os.name == 'nt' +os.environ['FS_PLUGIN_PATH'] = 'gtk\\lib\\farstream-0.1' +os.environ['GST_PLUGIN_PATH'] = 'gtk\\lib\\gstreamer-0.10' import gi gi.require_version('Farstream', '0.2') from gi.repository import Farstream diff -r a46891c400bc -r 8898f392acb2 src/gajim.py --- a/src/gajim.py Thu Mar 27 12:42:19 2014 +0100 +++ b/src/gajim.py Sun Mar 09 10:25:26 2014 +0100 @@ -62,6 +62,12 @@ new_list.insert(0, os.path.join(os.getcwd(), 'gtk', 'bin')) os.environ['PATH'] = ';'.join(new_list) +# Needs to be imported very early to not crash Gajim on exit. +try: +__import__('libxml2mod') +except ImportError: +pass + try: import nbxmpp except ImportError: ___ Commits mailing list C
python-nbxmpp: prepare 0.4 release
changeset 82883ceb3310 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=82883ceb3310 description: prepare 0.4 release diffstat: ChangeLog | 6 ++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diffs (25 lines): diff -r 53533c9fd19e -r 82883ceb3310 ChangeLog --- a/ChangeLog Tue Mar 04 17:58:52 2014 +0100 +++ b/ChangeLog Sat Mar 15 20:39:59 2014 +0100 @@ -1,3 +1,9 @@ +python-nbxmpp 0.4 (15 March 2014) + + * Ability to configure TLS protocol version + * Add support for SCRAM-SHA-1-PLUS + * Security improvements + python-nbxmpp 0.3 (23 December 2013) * Improve security level diff -r 53533c9fd19e -r 82883ceb3310 setup.py --- a/setup.py Tue Mar 04 17:58:52 2014 +0100 +++ b/setup.py Sat Mar 15 20:39:59 2014 +0100 @@ -3,7 +3,7 @@ from distutils.core import setup setup(name='nbxmpp', - version='0.3', + version='0.4', description='Non blocking Jabber/XMPP module', author='Yann Leboulanger', author_email='aste...@lagaule.org', ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: Disable session resumption, protection against Tr...
changeset 53533c9fd19e in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=53533c9fd19e description: Disable session resumption, protection against Triple Handshakes TLS attack. Session resumption is currently not supported in Gajim, because Connection.get_session, Connection.set_session are not used. But in case someone will try to use them in future disable session cache using Context.set_session_cache_mode(OpenSSL.SSL.SESS_CACHE_OFF) Fixes #21 diffstat: nbxmpp/tls_nb.py | 6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diffs (16 lines): diff -r 74fbe875e750 -r 53533c9fd19e nbxmpp/tls_nb.py --- a/nbxmpp/tls_nb.py Tue Mar 04 17:46:08 2014 +0100 +++ b/nbxmpp/tls_nb.py Tue Mar 04 17:58:52 2014 +0100 @@ -392,6 +392,12 @@ tcpsock._sslContext.set_options(flags) +try: # Supported only pyOpenSSL >= 0.14 +# Disable session resumption, protection against Triple Handshakes TLS attack + tcpsock._sslContext.set_session_cache_mode(OpenSSL.SSL.SESS_CACHE_OFF) +except AttributeError, e: +pass + # NonBlockingHTTPBOSH instance has no attribute _owner if hasattr(tcpsock, '_owner') and tcpsock._owner._caller.client_cert \ and os.path.exists(tcpsock._owner._caller.client_cert): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: New option 'authentication_mechanisms'
changeset b5f267679cbe in /home/hg/repos/gajim author: Fedor Brunner branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b5f267679cbe description: New option 'authentication_mechanisms' Fixes #7671 diffstat: src/common/config.py | 1 + src/common/connection.py | 9 - 2 files changed, 9 insertions(+), 1 deletions(-) diffs (31 lines): diff -r b4648e4208c1 -r b5f267679cbe src/common/config.py --- a/src/common/config.py Fri Feb 28 11:02:26 2014 +0100 +++ b/src/common/config.py Sat Mar 01 21:16:24 2014 +0100 @@ -351,6 +351,7 @@ 'connection_types': [ opt_str, 'tls ssl plain', _('Ordered list (space separated) of connection type to try. Can contain tls, ssl or plain')], 'tls_version': [ opt_str, '1.0', '' ], 'cipher_list': [ opt_str, 'HIGH:!aNULL:RC4-SHA', '' ], +'authentication_mechanisms': [ opt_str, '', _('List (space separated) of authentication mechanisms to try. Can contain ANONYMOUS, EXTERNAL, GSSAPI, SCRAM-SHA-1-PLUS, SCRAM-SHA-1, DIGEST-MD5, PLAIN, X-MESSENGER-OAUTH2 or XEP-0078') ], 'action_when_plaintext_connection': [ opt_str, 'warn', _('Show a warning dialog before sending password on an plaintext connection. Can be \'warn\', \'connect\', \'disconnect\'') ], 'warn_when_insecure_ssl_connection': [ opt_bool, True, _('Show a warning dialog before using standard SSL library.') ], 'warn_when_insecure_password': [ opt_bool, True, _('Show a warning dialog before sending PLAIN password over a plain connection.') ], diff -r b4648e4208c1 -r b5f267679cbe src/common/connection.py --- a/src/common/connection.py Fri Feb 28 11:02:26 2014 +0100 +++ b/src/common/connection.py Sat Mar 01 21:16:24 2014 +0100 @@ -1465,8 +1465,15 @@ return True self._register_handlers(con, con_type) +auth_mechs = gajim.config.get_per('accounts', self.name, 'authentication_mechanisms') +auth_mechs = auth_mechs.split() +for mech in auth_mechs: +if mech not in nbxmpp.auth_nb.SASL_AUTHENTICATION_MECHANISMS | set(['XEP-0078']): +log.warning("Unknown authentication mechanisms %s" % mech) +if len(auth_mechs) == 0: +auth_mechs = None con.auth(user=name, password=self.password, -resource=self.server_resource, sasl=1, on_auth=self.__on_auth) +resource=self.server_resource, sasl=True, on_auth=self.__on_auth, auth_mechs=auth_mechs) def ssl_certificate_accepted(self): if not self.connection: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix using transport sid in jingle IBB instead of jingle sid
changeset fdc9369f188f in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=fdc9369f188f description: fix using transport sid in jingle IBB instead of jingle sid fix double iq-result sending diffstat: src/common/file_props.py | 7 +++ src/common/jingle_content.py | 3 ++- src/common/jingle_ft.py | 7 --- src/common/jingle_ftstates.py | 1 + src/common/protocol/bytestream.py | 22 +++--- 5 files changed, 21 insertions(+), 19 deletions(-) diffs (158 lines): diff -r 4a1ff28d8ca9 -r fdc9369f188f src/common/file_props.py --- a/src/common/file_props.py Sun Feb 23 20:53:04 2014 +0100 +++ b/src/common/file_props.py Mon Feb 24 22:13:25 2014 +0100 @@ -63,6 +63,13 @@ return fp @classmethod +def getFilePropByTransportSid(cls, account, sid): +files_prop = cls.getAllFileProp() +for fp in files_prop: +if fp.account == account and fp.transport_sid == sid: +return fp + +@classmethod def getAllFileProp(cls): return list(cls._files_props.values()) diff -r 4a1ff28d8ca9 -r fdc9369f188f src/common/jingle_content.py --- a/src/common/jingle_content.py Sun Feb 23 20:53:04 2014 +0100 +++ b/src/common/jingle_content.py Mon Feb 24 22:13:25 2014 +0100 @@ -199,7 +199,8 @@ if self.file_props.size < 1000 and not \ self.file_props.hash_: h = self._calcHash() -file_tag.addChild(node=h) +if h: +file_tag.addChild(node=h) pjid = gajim.get_jid_without_resource(self.session.peerjid) file_info = {'name' : self.file_props.name, 'file-name' : self.file_props.file_name, diff -r 4a1ff28d8ca9 -r fdc9369f188f src/common/jingle_ft.py --- a/src/common/jingle_ft.py Sun Feb 23 20:53:04 2014 +0100 +++ b/src/common/jingle_ft.py Mon Feb 24 22:13:25 2014 +0100 @@ -174,10 +174,6 @@ def __on_session_accept(self, stanza, content, error, action): log.info("__on_session_accept") con = self.session.connection -# We ack the session accept -response = stanza.buildReply('result') -response.delChild(response.getQuery()) -con.connection.send(response) security = content.getTag('security') if not security: # responder can not verify our fingerprint self.use_security = False @@ -289,9 +285,6 @@ 'sendCand' : False} if self.state == STATE_CAND_SENT: self.__state_changed(STATE_CAND_SENT_AND_RECEIVED, args) -response = stanza.buildReply('result') -response.delChild(response.getQuery()) -self.session.connection.connection.send(response) self.__state_changed(STATE_TRANSFERING) raise nbxmpp.NodeProcessed else: diff -r 4a1ff28d8ca9 -r fdc9369f188f src/common/jingle_ftstates.py --- a/src/common/jingle_ftstates.py Sun Feb 23 20:53:04 2014 +0100 +++ b/src/common/jingle_ftstates.py Mon Feb 24 22:13:25 2014 +0100 @@ -140,6 +140,7 @@ ''' def __start_IBB_transfer(self, con): +self.jft.file_props.transport_sid = self.jft.transport.sid fp = open(self.jft.file_props.file_name, 'r') con.OpenStream( self.jft.file_props.sid, self.jft.session.peerjid, fp, blocksize=4096) diff -r 4a1ff28d8ca9 -r fdc9369f188f src/common/protocol/bytestream.py --- a/src/common/protocol/bytestream.py Sun Feb 23 20:53:04 2014 +0100 +++ b/src/common/protocol/bytestream.py Mon Feb 24 22:13:25 2014 +0100 @@ -184,6 +184,7 @@ if nbxmpp.NS_BYTESTREAM in file_props.stream_methods: field.setValue(nbxmpp.NS_BYTESTREAM) else: +file_props.transport_sid = file_props.sid field.setValue(nbxmpp.NS_IBB) self.connection.send(iq) @@ -249,6 +250,7 @@ raise nbxmpp.NodeProcessed if field.getValue() == nbxmpp.NS_IBB: sid = file_props.sid +file_props.transport_sid = sid fp = open(file_props.file_name, 'r') self.OpenStream(sid, file_props.receiver, fp) raise nbxmpp.NodeProcessed @@ -780,7 +782,7 @@ blocksize = stanza.getTagAttr('open', 'block-size') log.debug('StreamOpenHandler called sid->%s blocksize->%s' % (sid, blocksize)) -file_props = FilesProp.getFileProp(self.name, sid) +file_props = FilesProp.getFilePropByTransportSid(self.name, sid) try: blocksize = int(blocksize) except: @@ -851,8 +853,8 @@ file_props.disconnect_cb = None file_props.continue_cb = None syn = nbxmpp.Protocol('iq', to, 'set', payload=[nbxmpp.Node( -nbxmpp.NS_IBB + ' open', {'sid': sid, 'block-size': blocksize, -
python-nbxmpp: initialize ssl_errnum to 0
changeset 3dec8187531c in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=3dec8187531c description: initialize ssl_errnum to 0 py2 -> py3 diffstat: nbxmpp/bosh.py | 2 +- nbxmpp/tls_nb.py| 6 +++--- nbxmpp/transports_nb.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diffs (49 lines): diff -r 82883ceb3310 -r 3dec8187531c nbxmpp/bosh.py --- a/nbxmpp/bosh.pySat Mar 15 20:39:59 2014 +0100 +++ b/nbxmpp/bosh.pyThu Mar 27 13:22:15 2014 +0100 @@ -94,7 +94,7 @@ # ssl variables self.ssl_certificate = None -self.ssl_errnum = None +self.ssl_errnum = 0 def connect(self, conn_5tuple, on_connect, on_connect_failure): diff -r 82883ceb3310 -r 3dec8187531c nbxmpp/tls_nb.py --- a/nbxmpp/tls_nb.py Sat Mar 15 20:39:59 2014 +0100 +++ b/nbxmpp/tls_nb.py Thu Mar 27 13:22:15 2014 +0100 @@ -383,10 +383,10 @@ if self.tls_version not in ('1.0', '1.1'): try: flags |= OpenSSL.SSL.OP_NO_TLSv1_1 -except AttributeError, e: +except AttributeError as e: # older py-OpenSSL flags |= 0x1000 -except AttributeError, e: +except AttributeError as e: pass # much older py-OpenSSL @@ -395,7 +395,7 @@ try: # Supported only pyOpenSSL >= 0.14 # Disable session resumption, protection against Triple Handshakes TLS attack tcpsock._sslContext.set_session_cache_mode(OpenSSL.SSL.SESS_CACHE_OFF) -except AttributeError, e: +except AttributeError as e: pass # NonBlockingHTTPBOSH instance has no attribute _owner diff -r 82883ceb3310 -r 3dec8187531c nbxmpp/transports_nb.py --- a/nbxmpp/transports_nb.py Sat Mar 15 20:39:59 2014 +0100 +++ b/nbxmpp/transports_nb.py Thu Mar 27 13:22:15 2014 +0100 @@ -320,7 +320,7 @@ # ssl variables self.ssl_certificate = None -self.ssl_errnum = None +self.ssl_errnum = 0 # FIXME: transport should not be aware xmpp def start_disconnect(self): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Copyright 2013>2014
changeset 1b1d2c5425a0 in /home/hg/repos/gajim author: Denis Fomin branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=1b1d2c5425a0 description: Copyright 2013>2014 diffstat: setup_win32.py | 2 +- src/adhoc_commands.py | 2 +- src/advanced_configuration_window.py | 2 +- src/atom_window.py | 2 +- src/cell_renderer_image.py | 2 +- src/chat_control.py| 2 +- src/common/atom.py | 2 +- src/common/caps_cache.py | 2 +- src/common/check_paths.py | 2 +- src/common/commands.py | 2 +- src/common/config.py | 2 +- src/common/configpaths.py | 2 +- src/common/connection.py | 2 +- src/common/connection_handlers.py | 2 +- src/common/connection_handlers_events.py | 2 +- src/common/contacts.py | 2 +- src/common/dataforms.py| 2 +- src/common/dbus_support.py | 2 +- src/common/defs.py | 2 +- src/common/dh.py | 2 +- src/common/events.py | 2 +- src/common/exceptions.py | 2 +- src/common/fuzzyclock.py | 2 +- src/common/gajim.py| 2 +- src/common/gnupg.py| 4 ++-- src/common/gpg.py | 2 +- src/common/helpers.py | 2 +- src/common/i18n.py | 2 +- src/common/location_listener.py| 2 +- src/common/logger.py | 2 +- src/common/optparser.py| 2 +- src/common/passwords.py| 2 +- src/common/pep.py | 2 +- src/common/protocol/bytestream.py | 2 +- src/common/proxy65_manager.py | 2 +- src/common/pubsub.py | 2 +- src/common/rst_xhtml_generator.py | 2 +- src/common/sleepy.py | 2 +- src/common/socks5.py | 2 +- src/common/stanza_session.py | 2 +- src/common/zeroconf/connection_zeroconf.py | 2 +- src/config.py | 2 +- src/conversation_textview.py | 2 +- src/dataforms_widget.py| 2 +- src/dialogs.py | 4 ++-- src/disco.py | 2 +- src/features_window.py | 2 +- src/filetransfers_window.py| 2 +- src/gajim-remote.py| 2 +- src/gajim.py | 2 +- src/gajim_themes_window.py | 2 +- src/groupchat_control.py | 2 +- src/groups.py | 2 +- src/gtkexcepthook.py | 2 +- src/gtkgui_helpers.py | 2 +- src/gui_interface.py | 2 +- src/gui_menu_builder.py| 2 +- src/history_manager.py | 2 +- src/history_window.py | 2 +- src/htmltextview.py| 2 +- src/ipython_view.py| 2 +- src/logind_listener.py | 2 +- src/message_control.py | 2 +- src/message_textview.py| 2 +- src/message_window.py | 2 +- src/music_track_listener.py| 2 +- src/negotiation.py | 2 +- src/network_manager_listener.py| 2 +- src/notify.py | 2 +- src/profile_window.py | 2 +- src/remote_control.py | 2 +- src/roster_window.py | 2 +- src/search_window.py | 2 +- src/session.py | 2 +- src/statusicon.py | 2 +- src/tooltips.py| 2 +- src/upower_listener.py | 2 +- src/vcard.py | 2 +- 78 files changed, 80 insertions(+), 80 deletions(-) diffs (truncated from 950 to 300 lines): diff -r 4a28b4224af1 -r 1b1d2c5425a0 setup_win32.py --- a/setup_win32.pyWed Jan 01 22:32:00 2014 +0100 +++ b/setup_win32.pyThu Jan 02 12:33:54 2014 +0400 @@ -1,6 +1,6 @@ ## setup_win32.py (run me as python setup_win32.py py2exe -O2) ## -## Copyright (C) 2003-2013 Yann Leboulanger +## Copyright (C) 2003-2014 Yann Leboulanger ## Copyright (C) 2005-2006 Nikos Kouremenos ## Copyright (C) 2008 Jonathan Schleifer ## diff -r 4a28b4224af1 -r 1b1d2c5425a0 src/adhoc_commands.py --- a/src/adhoc_commands.py Wed Jan 01 22:32:00 2014 +0100 +++ b/src/adhoc_commands.py Thu Jan 02 12:33:54 2014 +0400 @@ -3,7 +3,7 @@ ## ## Copyright (C
gajim: use sys.stderr.isatty() to decide if we use colors in log...
changeset bcd3a4356f13 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bcd3a4356f13 description: use sys.stderr.isatty() to decide if we use colors in log output or not. diffstat: src/gajim.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 6cf0b3311453 -r bcd3a4356f13 src/gajim.py --- a/src/gajim.py Sun Mar 02 11:26:52 2014 +0100 +++ b/src/gajim.py Sat Mar 08 10:07:40 2014 +0100 @@ -115,7 +115,7 @@ sys.path.append('.') from common import logging_helpers -logging_helpers.init('TERM' in os.environ) +logging_helpers.init(sys.stderr.isatty()) import logging # gajim.gui or gajim.gtk more appropriate ? ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix receiving highlighted corrected message. Fixes #7431
changeset 3450c48ddb75 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=3450c48ddb75 description: fix receiving highlighted corrected message. Fixes #7431 diffstat: src/conversation_textview.py | 6 -- src/groupchat_control.py | 40 ++-- 2 files changed, 42 insertions(+), 4 deletions(-) diffs (73 lines): diff -r bb651151e276 -r 3450c48ddb75 src/conversation_textview.py --- a/src/conversation_textview.py Mon Jan 27 20:18:42 2014 +0100 +++ b/src/conversation_textview.py Wed Jan 29 22:10:48 2014 +0100 @@ -479,7 +479,8 @@ self.last_sent_message_marks[1] = buffer_.create_mark(None, i2, left_gravity=True) -def correct_last_received_message(self, message, xhtml, name, old_txt): +def correct_last_received_message(self, message, xhtml, name, old_txt, +other_tags_for_name=[], other_tags_for_text=[]): if name not in self.last_received_message_marks: return m1 = self.last_received_message_marks[name][0] @@ -490,7 +491,8 @@ txt = buffer_.get_text(i1, i2, True) buffer_.delete(i1, i2) i2 = self.print_conversation_line(message, '', 'incoming', name, None, -xhtml=xhtml, iter_=i1) +other_tags_for_name=other_tags_for_name, +other_tags_for_text=other_tags_for_text, xhtml=xhtml, iter_=i1) tt_txt = _('Message was corrected. Last message was:\n %s') % \ GLib.markup_escape_text(old_txt) self.show_corrected_message_warning(i2, tt_txt) diff -r bb651151e276 -r 3450c48ddb75 src/groupchat_control.py --- a/src/groupchat_control.py Mon Jan 27 20:18:42 2014 +0100 +++ b/src/groupchat_control.py Wed Jan 29 22:10:48 2014 +0100 @@ -1035,8 +1035,44 @@ obj.xhtml_msgtxt, obj.nick, old_txt) else: old_txt = self.last_received_txt[obj.nick] - self.conv_textview.correct_last_received_message(obj.msgtxt, -obj.xhtml_msgtxt, obj.nick, old_txt) +(highlight, sound) = self.highlighting_for_message(obj.msgtxt, obj.timestamp) +other_tags_for_name = [] +other_tags_for_text = [] +if obj.nick in self.gc_custom_colors: +other_tags_for_name.append('gc_nickname_color_' + \ +str(self.gc_custom_colors[obj.nick])) +else: +self.gc_count_nicknames_colors += 1 +if self.gc_count_nicknames_colors == \ +self.number_of_colors: +self.gc_count_nicknames_colors = 0 +self.gc_custom_colors[obj.nick] = \ +self.gc_count_nicknames_colors +other_tags_for_name.append('gc_nickname_color_' + \ +str(self.gc_count_nicknames_colors)) +if highlight: +# muc-specific chatstate +if self.parent_win: +self.parent_win.redraw_tab(self, 'attention') +else: +self.attention_flag = True +other_tags_for_name.append('bold') +other_tags_for_text.append('marked') + +if obj.nick in self.attention_list: +self.attention_list.remove(obj.nick) +elif len(self.attention_list) > 6: +self.attention_list.pop(0) # remove older +self.attention_list.append(obj.nick) + +if obj.msgtxt.startswith('/me ') or \ +obj.msgtxt.startswith('/me\n'): +other_tags_for_text.append('gc_nickname_color_' + \ +str(self.gc_custom_colors[obj.nick])) +self.conv_textview.correct_last_received_message( +obj.msgtxt, obj.xhtml_msgtxt, obj.nick, old_txt, +other_tags_for_name=other_tags_for_name, +other_tags_for_text=other_tags_for_text) self.last_received_txt[obj.nick] = obj.msgtxt self.last_received_id[obj.nick] = obj.stanza.getID() return ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add ability to configure TLS protocol version.
changeset 78c793ed087b in /home/hg/repos/gajim author: Fedor Brunner branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=78c793ed087b description: Add ability to configure TLS protocol version. add configuration option tls_version Related to https://python-nbxmpp.gajim.org/ticket/17 diffstat: src/common/config.py | 1 + src/common/connection.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diffs (27 lines): diff -r 43fa61ed5fb7 -r 78c793ed087b src/common/config.py --- a/src/common/config.py Sun Jan 26 19:36:23 2014 +0100 +++ b/src/common/config.py Mon Jan 27 16:31:08 2014 +0100 @@ -349,6 +349,7 @@ 'enable_esessions': [opt_bool, True, _('Enable ESessions encryption for this account.')], 'autonegotiate_esessions': [opt_bool, True, _('Should Gajim automatically start an encrypted session when possible?')], 'connection_types': [ opt_str, 'tls ssl plain', _('Ordered list (space separated) of connection type to try. Can contain tls, ssl or plain')], +'tls_version': [ opt_str, '1.0', '' ], 'cipher_list': [ opt_str, 'HIGH:!aNULL:RC4-SHA', '' ], 'action_when_plaintext_connection': [ opt_str, 'warn', _('Show a warning dialog before sending password on an plaintext connection. Can be \'warn\', \'connect\', \'disconnect\'') ], 'warn_when_insecure_ssl_connection': [ opt_bool, True, _('Show a warning dialog before using standard SSL library.') ], diff -r 43fa61ed5fb7 -r 78c793ed087b src/common/connection.py --- a/src/common/connection.py Sun Jan 26 19:36:23 2014 +0100 +++ b/src/common/connection.py Mon Jan 27 16:31:08 2014 +0100 @@ -1252,9 +1252,11 @@ if not os.path.exists(cacerts): cacerts = '' mycerts = common.gajim.MY_CACERTS +tls_version = gajim.config.get_per('accounts', self.name, +'tls_version') cipher_list = gajim.config.get_per('accounts', self.name, 'cipher_list') -secure_tuple = (self._current_type, cacerts, mycerts, cipher_list) +secure_tuple = (self._current_type, cacerts, mycerts, tls_version, cipher_list) con = nbxmpp.NonBlockingClient( domain=self._hostname, ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: we now require python-nbxmpp 0.3.3
changeset b95ba89c5076 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b95ba89c5076 description: we now require python-nbxmpp 0.3.3 diffstat: src/gajim.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (18 lines): diff -r b5f267679cbe -r b95ba89c5076 src/gajim.py --- a/src/gajim.py Sat Mar 01 21:16:24 2014 +0100 +++ b/src/gajim.py Sat Mar 01 21:29:46 2014 +0100 @@ -70,11 +70,11 @@ try: from distutils.version import LooseVersion as V -if V(nbxmpp.__version__) < V("0.3.1"): -print('Gajim needs python-nbxmpp > 0.3.1 to run. Quiting...') +if V(nbxmpp.__version__) < V("0.3.3"): +print('Gajim needs python-nbxmpp > 0.3.3 to run. Quiting...') sys.exit() except: -print('Gajim needs python-nbxmpp > 0.3.1 to run. Quiting...') +print('Gajim needs python-nbxmpp > 0.3.3 to run. Quiting...') sys.exit() #from common import demandimport ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: prevent traceback. Fixes #7592
changeset 727011dd6180 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=727011dd6180 description: prevent traceback. Fixes #7592 diffstat: src/tooltips.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r eac993c50375 -r 727011dd6180 src/tooltips.py --- a/src/tooltips.py Wed Feb 12 14:04:19 2014 +0100 +++ b/src/tooltips.py Sat Feb 15 21:28:39 2014 +0100 @@ -776,7 +776,7 @@ else: status = _('Not started') properties.append((_('Status: '), status)) -file_desc = file_props.desc +file_desc = file_props.desc or '' properties.append((_('Description: '), GLib.markup_escape_text( file_desc))) while properties: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: active plugin installer plugin by default if it's availab...
changeset eac993c50375 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=eac993c50375 description: active plugin installer plugin by default if it's available. Fixes #7655 diffstat: src/gui_interface.py | 4 1 files changed, 4 insertions(+), 0 deletions(-) diffs (14 lines): diff -r bba1663fafb6 -r eac993c50375 src/gui_interface.py --- a/src/gui_interface.py Wed Feb 05 12:46:48 2014 +0100 +++ b/src/gui_interface.py Wed Feb 12 14:04:19 2014 +0100 @@ -2754,6 +2754,10 @@ cfg_was_read = parser.read() +if not cfg_was_read: +# enable plugin_installer by default when creating config file +gajim.config.set_per('plugins', 'plugin_installer', 'active', True) + gajim.logger.reset_shown_unread_messages() # override logging settings from config (don't take care of '-q' option) if gajim.config.get('verbose'): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Add new entries from https://xmpp.net/services.xml
changeset 984466d47cec in /home/hg/repos/gajim author: Fedor Brunner branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=984466d47cec description: Add new entries from https://xmpp.net/services.xml diffstat: data/other/servers.xml | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diffs (89 lines): diff -r 4a34aa6756ed -r 984466d47cec data/other/servers.xml --- a/data/other/servers.xmlThu Jan 23 16:18:32 2014 +0100 +++ b/data/other/servers.xmlThu Jan 23 16:29:04 2014 +0100 @@ -11,12 +11,14 @@ + + @@ -24,6 +26,7 @@ + @@ -45,7 +48,9 @@ + + @@ -56,10 +61,13 @@ + + + @@ -71,12 +79,16 @@ + + + + @@ -86,6 +98,7 @@ + @@ -101,11 +114,13 @@ + + ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Old pyOpenSSL is missing get_signature_algorithm. Use the...
changeset 9719058efd38 in /home/hg/repos/gajim author: fedor.brunner branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=9719058efd38 description: Old pyOpenSSL is missing get_signature_algorithm. Use the default "sha256" signature algorithm for old pyOpenSSL. Fixes #7641 diffstat: src/common/jingle_content.py | 6 +- src/common/jingle_xtls.py| 6 +- 2 files changed, 10 insertions(+), 2 deletions(-) diffs (32 lines): diff -r 467ca96b694a -r 9719058efd38 src/common/jingle_content.py --- a/src/common/jingle_content.py Sun Feb 16 11:51:19 2014 +0100 +++ b/src/common/jingle_content.py Sun Feb 16 17:41:31 2014 +0100 @@ -220,7 +220,11 @@ + '.cert' cert = load_cert_file(certpath) if cert: -digest_algo = cert.get_signature_algorithm().split('With')[0] +try: +digest_algo = cert.get_signature_algorithm().split('With')[0] +except AttributeError, e: +# Old py-OpenSSL is missing get_signature_algorithm +digest_algo = "sha256" security.addChild('fingerprint').addData(cert.digest( digest_algo)) for m in ('x509', ): # supported authentication methods diff -r 467ca96b694a -r 9719058efd38 src/common/jingle_xtls.py --- a/src/common/jingle_xtls.py Sun Feb 16 11:51:19 2014 +0100 +++ b/src/common/jingle_xtls.py Sun Feb 16 17:41:31 2014 +0100 @@ -192,7 +192,11 @@ if os.path.exists(certpath): cert = load_cert_file(certpath) if cert: -digest_algo = cert.get_signature_algorithm().split('With')[0] +try: +digest_algo = cert.get_signature_algorithm().split('With')[0] +except AttributeError, e: +# Old py-OpenSSL is missing get_signature_algorithm +digest_algo = "sha256" if cert.digest(digest_algo) == fingerprint: return True return False ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: add a new event that is sent just before changing status....
changeset 0cb55c12b4b0 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=0cb55c12b4b0 description: add a new event that is sent just before changing status. Fixes #7593 diffstat: src/common/connection.py | 8 src/common/connection_handlers_events.py | 4 2 files changed, 12 insertions(+), 0 deletions(-) diffs (51 lines): diff -r 2a3a84d4a33d -r 0cb55c12b4b0 src/common/connection.py --- a/src/common/connection.py Mon Jan 13 20:25:07 2014 +0100 +++ b/src/common/connection.py Tue Jan 14 22:48:51 2014 +0100 @@ -708,12 +708,16 @@ if gajim.HAVE_GPG: self.USE_GPG = True self.gpg = gpg.GnuPG(gajim.config.get('use_gpg_agent')) +gajim.nec.push_incoming_event(BeforeChangeShowEvent(None, +conn=self, show=show, message=msg)) self.connect_and_init(show, msg, sign_msg) return if show == 'offline': self.connected = 0 if self.connection: +gajim.nec.push_incoming_event(BeforeChangeShowEvent(None, +conn=self, show=show, message=msg)) p = nbxmpp.Presence(typ = 'unavailable') p = self.add_sha(p, False) if msg: @@ -731,12 +735,16 @@ if self.connected == 1: return if show == 'invisible': +gajim.nec.push_incoming_event(BeforeChangeShowEvent(None, +conn=self, show=show, message=msg)) self._change_to_invisible(msg) return if show not in ['offline', 'online', 'chat', 'away', 'xa', 'dnd']: return -1 was_invisible = self.connected == gajim.SHOW_LIST.index('invisible') self.connected = gajim.SHOW_LIST.index(show) +gajim.nec.push_incoming_event(BeforeChangeShowEvent(None, +conn=self, show=show, message=msg)) if was_invisible: self._change_from_invisible() self._update_status(show, msg) diff -r 2a3a84d4a33d -r 0cb55c12b4b0 src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Mon Jan 13 20:25:07 2014 +0100 +++ b/src/common/connection_handlers_events.py Tue Jan 14 22:48:51 2014 +0100 @@ -997,6 +997,10 @@ name = 'our-show' base_network_events = [] +class BeforeChangeShowEvent(nec.NetworkIncomingEvent): +name = 'before-change-show' +base_network_events = [] + class MessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent): name = 'message-received' base_network_events = ['raw-message-received'] ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: print message to console in correct encoding. Fixes #7652
changeset 6cf0b3311453 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=6cf0b3311453 description: print message to console in correct encoding. Fixes #7652 diffstat: src/gajim.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (22 lines): diff -r b95ba89c5076 -r 6cf0b3311453 src/gajim.py --- a/src/gajim.py Sat Mar 01 21:29:46 2014 +0100 +++ b/src/gajim.py Sun Mar 02 11:26:52 2014 +0100 @@ -147,7 +147,7 @@ sys.exit(2) for o, a in opts: if o in ('-h', '--help'): -print(_('Usage:') + \ +out = _('Usage:') + \ '\n gajim [options] filename\n\n' + \ _('Options:') + \ '\n -h, --help ' + \ @@ -161,7 +161,8 @@ '\n -c, --config-path ' + \ _('Set configuration directory') + \ '\n -l, --loglevel ' + \ -_('Configure logging system') + '\n') +_('Configure logging system') + '\n' +print(out.encode(locale.getpreferredencoding())) sys.exit() elif o in ('-q', '--quiet'): logging_helpers.set_quiet() ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: update windows build script for win7
changeset b1724179fb73 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b1724179fb73 description: update windows build script for win7 diffstat: build.bat | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r a9d3aa50bddd -r b1724179fb73 build.bat --- a/build.bat Mon Mar 10 21:47:21 2014 +0100 +++ b/build.bat Sat Mar 15 09:53:20 2014 +0100 @@ -35,6 +35,6 @@ for %%l in (po\*.po) do mkdir po\%%~nl & mkdir po\%%~nl\LC_MESSAGES & msgfmt -o po\%%~nl\LC_MESSAGES\gajim.mo %%l -"C:\Program Files\NSIS\makensis" gajim.nsi +"C:\Program Files (x86)\NSIS\makensis" gajim.nsi cd .. \ No newline at end of file ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: add a element to message stanza when message ca...
changeset b133c7299af2 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b133c7299af2 description: add a element to message stanza when message carbons is enabled and message is encrypted. Fixes #7616 diffstat: src/common/connection.py | 9 - 1 files changed, 8 insertions(+), 1 deletions(-) diffs (40 lines): diff -r 8b2649920d66 -r b133c7299af2 src/common/connection.py --- a/src/common/connection.py Tue Dec 31 14:28:24 2013 +0100 +++ b/src/common/connection.py Wed Jan 01 20:49:53 2014 +0100 @@ -164,6 +164,7 @@ self.roster_supported = True self.blocking_supported = False self.addressing_supported = False +self.carbons_enabled = False self.muc_jid = {} # jid of muc server for each transport type self._stun_servers = [] # STUN servers of our jabber server @@ -420,6 +421,8 @@ if msgenc: msg_iq.setTag(nbxmpp.NS_ENCRYPTED + ' x').setData(msgenc) +if self.carbons_enabled: +msg_iq.addChild(name='private', namespace=nbxmpp.NS_CARBONS) if form_node: msg_iq.addChild(node=form_node) @@ -492,6 +495,9 @@ # XEP-0200 if session.enable_encryption: msg_iq = session.encrypt_stanza(msg_iq) +if self.carbons_enabled: +msg_iq.addChild(name='private', +namespace=nbxmpp.NS_CARBONS) if callback: callback(jid, msg, keyID, forward_from, session, original_message, @@ -1937,7 +1943,8 @@ if nbxmpp.NS_ADDRESS in obj.features: self.addressing_supported = True if nbxmpp.NS_CARBONS in obj.features and gajim.config.get_per( -'accounts', self.name, 'enable_message_carbons'): +'accounts', self.name, 'enable_message_carbons'): +self.carbons_enabled = True # Server supports carbons, activate it iq = nbxmpp.Iq('set') iq.setTag('enable', namespace=nbxmpp.NS_CARBONS) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Sort entries in servers.xml
changeset 4a34aa6756ed in /home/hg/repos/gajim author: Fedor Brunner branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=4a34aa6756ed description: Sort entries in servers.xml diffstat: data/other/servers.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (13 lines): diff -r 1218cf009513 -r 4a34aa6756ed data/other/servers.xml --- a/data/other/servers.xmlThu Jan 23 15:29:27 2014 +0100 +++ b/data/other/servers.xmlThu Jan 23 16:18:32 2014 +0100 @@ -44,8 +44,8 @@ + - ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: get xid for windows correctly
changeset b4648e4208c1 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b4648e4208c1 description: get xid for windows correctly diffstat: src/chat_control.py | 8 ++-- src/dialogs.py | 16 2 files changed, 18 insertions(+), 6 deletions(-) diffs (47 lines): diff -r 0dc84e7d723a -r b4648e4208c1 src/chat_control.py --- a/src/chat_control.py Mon Feb 24 23:03:04 2014 +0100 +++ b/src/chat_control.py Fri Feb 28 11:02:26 2014 +0100 @@ -2253,8 +2253,12 @@ fixed = self.xml.get_object('outgoing_fixed') fixed.set_no_show_all(False) video_hbox.show_all() -out_xid = self.xml.get_object( -'outgoing_drawingarea').get_window().xid +if os.name == 'nt': +out_xid = self.xml.get_object( +'outgoing_drawingarea').get_window().handle +else: +out_xid = self.xml.get_object( +'outgoing_drawingarea').get_window().xid else: out_xid = None video_hbox.show_all() diff -r 0dc84e7d723a -r b4648e4208c1 src/dialogs.py --- a/src/dialogs.pyMon Feb 24 23:03:04 2014 +0100 +++ b/src/dialogs.pyFri Feb 28 11:02:26 2014 +0100 @@ -5391,13 +5391,21 @@ fixed = ctrl.xml.get_object('outgoing_fixed') fixed.set_no_show_all(False) video_hbox.show_all() -in_xid = ctrl.xml.get_object('incoming_drawingarea').\ -get_window().xid +if os.name == 'nt': +in_xid = ctrl.xml.get_object('incoming_drawingarea').\ +get_window().handle +else: +in_xid = ctrl.xml.get_object('incoming_drawingarea').\ +get_window().xid content = session.get_content('video') # move outgoing stream to chat window if gajim.config.get('video_see_self'): -out_xid = ctrl.xml.get_object('outgoing_drawingarea').\ -get_window().xid +if os.name == 'nt': +out_xid = ctrl.xml.get_object('outgoing_drawingarea').\ +get_window().handle +else: +out_xid = ctrl.xml.get_object('outgoing_drawingarea').\ +get_window().xid b = content.src_bin found = False for e in b.elements(): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: don't fail to receive a jingle FT request with no
changeset 4a1ff28d8ca9 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=4a1ff28d8ca9 description: don't fail to receive a jingle FT request with no tag diffstat: src/common/connection_handlers_events.py | 7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diffs (17 lines): diff -r 9719058efd38 -r 4a1ff28d8ca9 src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Sun Feb 16 17:41:31 2014 +0100 +++ b/src/common/connection_handlers_events.py Sun Feb 23 20:53:04 2014 +0100 @@ -2063,9 +2063,10 @@ if self.jingle_content: secu = self.jingle_content.getTag('security') self.FT_content.use_security = bool(secu) -fingerprint = secu.getTag('fingerprint') -if fingerprint: -self.FT_content.x509_fingerprint = fingerprint.getData() +if secu: +fingerprint = secu.getTag('fingerprint') +if fingerprint: +self.FT_content.x509_fingerprint = fingerprint.getData() if not self.FT_content.transport: self.FT_content.transport = JingleTransportSocks5() self.FT_content.transport.set_our_jid( ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: require nbxmpp 0.3.1
changeset bb651151e276 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bb651151e276 description: require nbxmpp 0.3.1 diffstat: src/gajim.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (18 lines): diff -r 78c793ed087b -r bb651151e276 src/gajim.py --- a/src/gajim.py Mon Jan 27 16:31:08 2014 +0100 +++ b/src/gajim.py Mon Jan 27 20:18:42 2014 +0100 @@ -70,11 +70,11 @@ try: from distutils.version import LooseVersion as V -if V(nbxmpp.__version__) < V("0.3"): -print('Gajim needs python-nbxmpp > 0.3 to run. Quiting...') +if V(nbxmpp.__version__) < V("0.3.1"): +print('Gajim needs python-nbxmpp > 0.3.1 to run. Quiting...') sys.exit() except: -print('Gajim needs python-nbxmpp > 0.3 to run. Quiting...') +print('Gajim needs python-nbxmpp > 0.3.1 to run. Quiting...') sys.exit() #from common import demandimport ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: remove outdated autopackage files
changeset 38c9e5472304 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=38c9e5472304 description: remove outdated autopackage files diffstat: autopackage/@dnspython.org/dnspython/skeleton.1 | 22 --- autopackage/@glade.gnome.org/libglade/skeleton.1 | 13 -- autopackage/@gnome.org/pyglade/skeleton.1 | 29 autopackage/@gnome.org/pygtk/skeleton.1 | 24 --- autopackage/@gtk.org/gtk/skeleton.1 | 25 autopackage/@gtkspell.sourceforge.net/gtkspell/skeleton.1 | 16 -- autopackage/@pydns.sourceforge.net/pydns/skeleton.1 | 22 --- autopackage/@pysqlite.org/pysqlite/skeleton.1 | 22 --- autopackage/@python.org/python-xml/skeleton.1 | 21 --- autopackage/@python.org/python/skeleton.1 | 20 --- autopackage/default.apspec| 93 --- 11 files changed, 0 insertions(+), 307 deletions(-) diffs (truncated from 351 to 300 lines): diff -r 792ee48ab707 -r 38c9e5472304 autopackage/@dnspython.org/dnspython/skeleton.1 --- a/autopackage/@dnspython.org/dnspython/skeleton.1 Sat Mar 15 09:53:48 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,22 +0,0 @@ -# -*- shell-script-mode -*- - -[Meta] -RootName: @dnspython.org/dnspython -DisplayName: dnspython is a DNS toolkit for Python -ShortName: dnspython -Skeleton-Author: Filippos Papadopoulos -Skeleton-Version: 1 - -[Notes] -Returns the full version e.g 1.3.3 - -[Test] -INTERFACE_VERSIONS=`python - < -Skeleton-Version: 1 - -[Notes] -This skeleton only detects libglade1 and 2, which are assigned interface numbers 1 and 2 respectively - -[Test] -testForLib libglade.so.0 && INTERFACE_VERSIONS="1" -testForLib libglade-2.0.so.0 && INTERFACE_VERSIONS="2 $INTERFACE_VERSIONS" diff -r 792ee48ab707 -r 38c9e5472304 autopackage/@gnome.org/pyglade/skeleton.1 --- a/autopackage/@gnome.org/pyglade/skeleton.1 Sat Mar 15 09:53:48 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,29 +0,0 @@ -# -*- shell-script-mode -*- - -[Meta] -RootName: @gnome.org/pyglade -DisplayName: Python bindings for Glade -ShortName: pyglade -Skeleton-Author: Filippos Papadopoulos -Skeleton-Version: 1 - -[Notes] -Pyglade is bundled within pygtk sources so they have the same versions - -[Test] -testForPythonModule gtk.glade -if [[ "$?" != "0" ]]; then -INTERFACE_VERSIONS="" -else - INTERFACE_VERSIONS=`python - < -Skeleton-Version: 1 - -[Notes] -Matchces GTK2 interface versioning - -[Test] -INTERFACE_VERSIONS=`python - < -Skeleton-Version: 1 - -[Notes] -Interface versions correspond to GTK released versions, as GTK version -numbering sensibly tracks the interfaces, ie GTK2.2 has an interface -version of 2.2, not 2.1 as would be the normal rules. - -Earliest detected version is GTK 1.2 - -[Test] -testForLib libgtk-1.2.so.0 && INTERFACE_VERSIONS=" 1.2" -gtk2versions=`testForLib -v libgtk-x11-2.0.so.0` -for v in $gtk2versions; do -minor=$( IFS=.; v=( $v ); echo ${v[1]} ) -minor=$[ $minor / 100 ] -INTERFACE_VERSIONS="2.$minor $INTERFACE_VERSIONS" -done -SOFTWARE_VERSIONS="$INTERFACE_VERSIONS" # this time.. diff -r 792ee48ab707 -r 38c9e5472304 autopackage/@gtkspell.sourceforge.net/gtkspell/skeleton.1 --- a/autopackage/@gtkspell.sourceforge.net/gtkspell/skeleton.1 Sat Mar 15 09:53:48 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,16 +0,0 @@ -# -*- shell-script-mode -*- - -[Meta] -RootName: @gtkspell.sourceforge.net/gtkspell -DisplayName: GtkSpell Spell Checking Library -ShortName: gtkspell -Skeleton-Author: Timothy Ringenbach -Skeleton-Version: 1 -Repository: http://www.gajim.org/downloads/gtkspell.xml - -[Notes] -This skeleton does not set SOFTWARE_VERSIONS -Interface versions start at 0. - -[Test] -INTERFACE_VERSIONS=`testForLib -i libgtkspell.so` diff -r 792ee48ab707 -r 38c9e5472304 autopackage/@pydns.sourceforge.net/pydns/skeleton.1 --- a/autopackage/@pydns.sourceforge.net/pydns/skeleton.1 Sat Mar 15 09:53:48 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 + @@ -1,22 +0,0 @@ -# -*- shell-script-mode -*- - -[Meta] -RootName: @pydns.sourceforge.net/pydns -DisplayName: PyDNS provides a python module for performing DNS queries -ShortName: pydns -Skeleton-Author: Filippos Papadopoulos -Skeleton-Version: 1 - -[Notes] - - -[Test] -INTERFACE_VERSIONS=`python - < -Skeleton-Version: 1 - -[Notes] -pysqlite is a Python DB-API 2.0 interface for the SQLite embedded relational database engine - -[Test] -INTERFACE_VERSIONS=`python - < -Skeleton-Version: 1 - -[Notes] -Distros like SuSE split some features of core python (like xml) to python-xml e.t.c -So python-xml must have the same versions as python - -[Test] -SOFTWARE_VERSIONS=$( locateCommand python -V 2>&1 | cut -f2 -d' ' ) -testForPythonModule xml -if [[ "$?" != "0" ]]; then -INTERFACE_VERSIONS="" -else -INTERFACE_VERSIONS=$( echo $SOFTW
gajim: make search button insensitive before we get the search f...
changeset 147a9657cf34 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=147a9657cf34 description: make search button insensitive before we get the search form. Fixes #7631 diffstat: src/search_window.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 984466d47cec -r 147a9657cf34 src/search_window.py --- a/src/search_window.py Thu Jan 23 16:29:04 2014 +0100 +++ b/src/search_window.py Sun Jan 26 08:59:24 2014 +0100 @@ -48,6 +48,8 @@ 'add_contact_button', 'information_button'): self.__dict__[name] = self.xml.get_object(name) +self.search_button.set_sensitive(False) + # displaying the window self.xml.connect_signals(self) self.window.show_all() @@ -152,6 +154,7 @@ self.data_form_widget.show_all() self.search_vbox.pack_start(self.data_form_widget, True, True, 0) +self.search_button.set_sensitive(True) def on_result_treeview_cursor_changed(self, treeview): if self.jid_column == -1: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: "A connection is not available" transient for chat contro...
changeset e6fabc5a3c35 in /home/hg/repos/gajim author: Denis Fomin branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=e6fabc5a3c35 description: "A connection is not available" transient for chat control. Fixes#7098 diffstat: src/chat_control.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (13 lines): diff -r 1b1d2c5425a0 -r e6fabc5a3c35 src/chat_control.py --- a/src/chat_control.py Thu Jan 02 12:33:54 2014 +0400 +++ b/src/chat_control.py Fri Jan 03 14:17:40 2014 +0400 @@ -830,7 +830,8 @@ if gajim.connections[self.account].connected < 2 and send_message: # we are not connected dialogs.ErrorDialog(_('A connection is not available'), -_('Your message can not be sent until you are connected.')) +_('Your message can not be sent until you are connected.'), +transient_for=self.parent_win.window) send_message = False if send_message: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: don't crash when we cannot connect to avahi. Fixes #7607
changeset 8b2649920d66 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=8b2649920d66 description: don't crash when we cannot connect to avahi. Fixes #7607 diffstat: src/common/zeroconf/connection_zeroconf.py | 1 + src/common/zeroconf/zeroconf_avahi.py | 7 --- 2 files changed, 5 insertions(+), 3 deletions(-) diffs (28 lines): diff -r 816e8c24c6db -r 8b2649920d66 src/common/zeroconf/connection_zeroconf.py --- a/src/common/zeroconf/connection_zeroconf.pyWed Mar 26 18:23:58 2014 +0100 +++ b/src/common/zeroconf/connection_zeroconf.pyTue Dec 31 14:28:24 2013 +0100 @@ -296,6 +296,7 @@ show=show)) else: # show notification that avahi or system bus is down +self.connected = 0 gajim.nec.push_incoming_event(OurShowEvent(None, conn=self, show='offline')) self.status = 'offline' diff -r 816e8c24c6db -r 8b2649920d66 src/common/zeroconf/zeroconf_avahi.py --- a/src/common/zeroconf/zeroconf_avahi.py Wed Mar 26 18:23:58 2014 +0100 +++ b/src/common/zeroconf/zeroconf_avahi.py Tue Dec 31 14:28:24 2013 +0100 @@ -277,9 +277,10 @@ state = self.server.GetState() if state == self.avahi.SERVER_RUNNING: -self.create_service() -self.announced = True -return True +if self.create_service(): + self.announced = True + return True +return False def remove_announce(self): if self.announced == False: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: force sending muc invitation to the jid/resource if we're...
changeset 2a3a84d4a33d in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=2a3a84d4a33d description: force sending muc invitation to the jid/resource if we're chatting with a specific resource. Fixes #7582 diffstat: src/gui_menu_builder.py | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diffs (39 lines): diff -r 4ce454f980c5 -r 2a3a84d4a33d src/gui_menu_builder.py --- a/src/gui_menu_builder.py Tue Jan 07 19:51:56 2014 +0100 +++ b/src/gui_menu_builder.py Mon Jan 13 20:25:07 2014 +0100 @@ -64,9 +64,11 @@ return sub_menu def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[], -show_bookmarked=False): +show_bookmarked=False, force_resource=False): """ list_ in a list of (contact, account) +force_resource means we want to send invitation even if there is only one +resource """ roster = gajim.interface.roster # used if we invite only one contact with several resources @@ -104,7 +106,7 @@ elif len(list_) == 1 and contact.supports(NS_MUC): invite_menuitem.set_sensitive(True) # use resource if it's self contact -if contact.jid == gajim.get_jid_from_account(account): +if contact.jid == gajim.get_jid_from_account(account) or force_resource: resource = contact.resource else: resource = None @@ -455,8 +457,12 @@ build_invite_submenu(invite_menuitem, [(gc_contact, account)], show_bookmarked=bookmarked) else: +force_resource = False +if control and control.resource: +force_resource = True build_invite_submenu(invite_menuitem, [(contact, account)], -show_bookmarked=contact.supports(NS_CONFERENCE)) +show_bookmarked=contact.supports(NS_CONFERENCE), +force_resource=force_resource) if gajim.account_is_disconnected(account): invite_menuitem.set_sensitive(False) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: copy big_brother_groups correctly when making metcontacts...
changeset 467ca96b694a in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=467ca96b694a description: copy big_brother_groups correctly when making metcontacts. Fixes #7574 diffstat: src/roster_window.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 727011dd6180 -r 467ca96b694a src/roster_window.py --- a/src/roster_window.py Sat Feb 15 21:28:39 2014 +0100 +++ b/src/roster_window.py Sun Feb 16 11:51:19 2014 +0100 @@ -360,7 +360,7 @@ assert len(parent_iters) > 0, 'Big brother is not yet in roster!' # Do not confuse get_contact_iter: Sync groups of family members -contact.groups = big_brother_contact.get_shown_groups()[:] +contact.groups = big_brother_contact.groups[:] for child_iter in parent_iters: it = self.model.append(child_iter, [None, ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: don't allow to do ctrl+r when roster is hidden. See #7315
changeset bba1663fafb6 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=bba1663fafb6 description: don't allow to do ctrl+r when roster is hidden. See #7315 diffstat: data/gui/roster_window.ui | 1 + src/message_window.py | 6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diffs (41 lines): diff -r 3450c48ddb75 -r bba1663fafb6 data/gui/roster_window.ui --- a/data/gui/roster_window.ui Wed Jan 29 22:10:48 2014 +0100 +++ b/data/gui/roster_window.ui Wed Feb 05 12:46:48 2014 +0100 @@ -319,6 +319,7 @@ True +False False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Show _Roster diff -r 3450c48ddb75 -r bba1663fafb6 src/message_window.py --- a/src/message_window.py Wed Jan 29 22:10:48 2014 +0100 +++ b/src/message_window.py Wed Feb 05 12:46:48 2014 +0100 @@ -86,6 +86,8 @@ self.parent_paned = parent_paned self.notebook.reparent(self.parent_paned) self.parent_paned.pack2(self.notebook, resize=True, shrink=True) +gajim.interface.roster.xml.get_object('show_roster_menuitem').\ +set_sensitive(True) orig_window.destroy() del orig_window @@ -615,6 +617,8 @@ # Don't close parent window, just remove the child child = self.parent_paned.get_child2() self.parent_paned.remove(child) +gajim.interface.roster.xml.get_object('show_roster_menuitem').\ +set_sensitive(False) else: self.window.destroy() return # don't show_title, we are dead @@ -1261,6 +1265,8 @@ # Don't close parent window, just remove the child child = w.parent_paned.get_child2() w.parent_paned.remove(child) +gajim.interface.roster.xml.get_object('show_roster_menuitem').\ +set_sensitive(False) gtkgui_helpers.resize_window(w.window, gajim.config.get('roster_width'), gajim.config.get('roster_height')) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix xmlns for jingleFT
changeset 0dc84e7d723a in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=0dc84e7d723a description: fix xmlns for jingleFT diffstat: src/common/jingle_content.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r fdc9369f188f -r 0dc84e7d723a src/common/jingle_content.py --- a/src/common/jingle_content.py Mon Feb 24 22:13:25 2014 +0100 +++ b/src/common/jingle_content.py Mon Feb 24 23:03:04 2014 +0100 @@ -175,7 +175,7 @@ simode = nbxmpp.simplexml.Node(tag='request') else: simode = nbxmpp.simplexml.Node(tag='offer') -file_tag = simode.setTag('file', namespace=nbxmpp.NS_FILE) +file_tag = simode.setTag('file') if self.file_props.name: node = nbxmpp.simplexml.Node(tag='name') node.addData(self.file_props.name) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: add paplay to the list of sound players. Fixes #7608
changeset a85ea64c7060 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=a85ea64c7060 description: add paplay to the list of sound players. Fixes #7608 diffstat: src/gui_interface.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (16 lines): diff -r e6fabc5a3c35 -r a85ea64c7060 src/gui_interface.py --- a/src/gui_interface.py Fri Jan 03 14:17:40 2014 +0400 +++ b/src/gui_interface.py Sun Jan 05 23:03:43 2014 +0100 @@ -2980,9 +2980,11 @@ if gajim.config.get('soundplayer') == '': # only on first time Gajim starts -commands = ('aplay', 'play', 'ossplay') +commands = ('paplay', 'aplay', 'play', 'ossplay') for command in commands: if helpers.is_in_path(command): +if command == 'paplay': +command += ' -n gajim' if command in ('aplay', 'play'): command += ' -q' elif command == 'ossplay': ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix some typos
changeset 3cd8c331000b in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=3cd8c331000b description: fix some typos diffstat: src/common/gajim.py | 2 +- src/common/jingle_content.py | 2 +- src/common/jingle_xtls.py| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diffs (36 lines): diff -r 38c9e5472304 -r 3cd8c331000b src/common/gajim.py --- a/src/common/gajim.py Sat Mar 15 11:23:27 2014 +0100 +++ b/src/common/gajim.py Thu Mar 27 13:21:28 2014 +0100 @@ -185,7 +185,7 @@ HAVE_FARSTREAM = True try: -if os.name == 'nt' +if os.name == 'nt': os.environ['FS_PLUGIN_PATH'] = 'gtk\\lib\\farstream-0.1' os.environ['GST_PLUGIN_PATH'] = 'gtk\\lib\\gstreamer-0.10' import gi diff -r 38c9e5472304 -r 3cd8c331000b src/common/jingle_content.py --- a/src/common/jingle_content.py Sat Mar 15 11:23:27 2014 +0100 +++ b/src/common/jingle_content.py Thu Mar 27 13:21:28 2014 +0100 @@ -223,7 +223,7 @@ if cert: try: digest_algo = cert.get_signature_algorithm().split('With')[0] -except AttributeError, e: +except AttributeError as e: # Old py-OpenSSL is missing get_signature_algorithm digest_algo = "sha256" security.addChild('fingerprint').addData(cert.digest( diff -r 38c9e5472304 -r 3cd8c331000b src/common/jingle_xtls.py --- a/src/common/jingle_xtls.py Sat Mar 15 11:23:27 2014 +0100 +++ b/src/common/jingle_xtls.py Thu Mar 27 13:21:28 2014 +0100 @@ -194,7 +194,7 @@ if cert: try: digest_algo = cert.get_signature_algorithm().split('With')[0] -except AttributeError, e: +except AttributeError as e: # Old py-OpenSSL is missing get_signature_algorithm digest_algo = "sha256" if cert.digest(digest_algo) == fingerprint: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: include HTMLParser module in windows build for OTR plugin
changeset 43fa61ed5fb7 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=43fa61ed5fb7 description: include HTMLParser module in windows build for OTR plugin diffstat: setup_win32.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 147a9657cf34 -r 43fa61ed5fb7 setup_win32.py --- a/setup_win32.pySun Jan 26 08:59:24 2014 +0100 +++ b/setup_win32.pySun Jan 26 19:36:23 2014 +0100 @@ -33,7 +33,7 @@ 'build_exe': { 'includes': ['Gdk.KEY_, 'dumbdbm', 'dbhash', 'bsddb', 'new', 'goocanvas', 'Crypto.PublicKey.DSA', 'Crypto.Hash.HMAC', -'numbers', 'win32com.client', 'win32com.server'], +'numbers', 'win32com.client', 'win32com.server', 'HTMLParser'], 'base': 'Win32GUI', 'bin_excludes': [ 'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll', ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: fix var name. Fixes #7668
changeset 4687645c49bc in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=4687645c49bc description: fix var name. Fixes #7668 diffstat: src/common/connection_handlers_events.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r bcd3a4356f13 -r 4687645c49bc src/common/connection_handlers_events.py --- a/src/common/connection_handlers_events.py Sat Mar 08 10:07:40 2014 +0100 +++ b/src/common/connection_handlers_events.py Sat Mar 08 12:19:15 2014 +0100 @@ -1636,8 +1636,8 @@ self.ssl_msg = '' if self.errnum > 0: from common.connection import ssl_error -self.ssl_msg = ssl_error.get(er, _('Unknown SSL error: %d') % \ -self.errnum) +self.ssl_msg = ssl_error.get(self.errnum, +_('Unknown SSL error: %d') % self.errnum) self.ssl_cert = '' self.ssl_fingerprint_sha1 = '' self.ssl_fingerprint_sha256 = '' ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: catch errors that could appear when running plugins gui e...
changeset b126752c304b in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=b126752c304b description: catch errors that could appear when running plugins gui extention points diffstat: src/plugins/pluginmanager.py | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diffs (43 lines): diff -r 4687645c49bc -r b126752c304b src/plugins/pluginmanager.py --- a/src/plugins/pluginmanager.py Sat Mar 08 12:19:15 2014 +0100 +++ b/src/plugins/pluginmanager.py Sun Mar 09 10:19:24 2014 +0100 @@ -255,7 +255,11 @@ if gui_extpoint_name in self.gui_extension_points_handlers: for handlers in self.gui_extension_points_handlers[ gui_extpoint_name]: -handlers[0](*args) +try: +handlers[0](*args) +except Exception, e: +log.warning('Error executing %s', handlers[0], +exc_info=True) def _register_events_handlers_in_ged(self, plugin): for event_name, handler in plugin.events_handlers.items(): @@ -326,7 +330,11 @@ gui_extpoint_name]: handler = gui_extpoint_handlers[1] if handler: -handler(*gui_extension_point_args) +try: +handler(*gui_extension_point_args) +except Exception, e: +log.warning('Error executing %s', handler, +exc_info=True) self._remove_events_handler_from_ged(plugin) self._remove_network_events_from_nec(plugin) @@ -357,7 +365,12 @@ gui_extpoint_name]: handler = gui_extpoint_handlers[0] if handler: -handler(*gui_extension_point_args) +try: +handler(*gui_extension_point_args) +except Exception, e: +log.warning('Error executing %s', handler, +exc_info=True) + @log_calls('PluginManager') def _activate_all_plugins(self): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Reformat the servers.xml using HTML Tidy tool
changeset 1218cf009513 in /home/hg/repos/gajim author: Fedor Brunner branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=1218cf009513 description: Reformat the servers.xml using HTML Tidy tool http://tidy.sourceforge.net/ diffstat: data/other/servers.xml | 107 - 1 files changed, 105 insertions(+), 2 deletions(-) diffs (118 lines): diff -r 21e37fe416a6 -r 1218cf009513 data/other/servers.xml --- a/data/other/servers.xmlTue Jan 21 15:27:41 2014 +0100 +++ b/data/other/servers.xmlThu Jan 23 15:29:27 2014 +0100 @@ -1,4 +1,4 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: change variable name
changeset 4ce454f980c5 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=4ce454f980c5 description: change variable name diffstat: src/common/helpers.py | 24 1 files changed, 12 insertions(+), 12 deletions(-) diffs (65 lines): diff -r a85ea64c7060 -r 4ce454f980c5 src/common/helpers.py --- a/src/common/helpers.py Sun Jan 05 23:03:43 2014 +0100 +++ b/src/common/helpers.py Tue Jan 07 19:51:56 2014 +0100 @@ -717,49 +717,49 @@ path_to_soundfile = gajim.config.get_per('soundevents', event, 'path') play_sound_file(path_to_soundfile) -def check_soundfile_path(file, dirs=(gajim.gajimpaths.data_root, +def check_soundfile_path(file_, dirs=(gajim.gajimpaths.data_root, gajim.DATA_DIR)): """ Check if the sound file exists -:param file: the file to check, absolute or relative to 'dirs' path +:param file_: the file to check, absolute or relative to 'dirs' path :param dirs: list of knows paths to fallback if the file doesn't exists (eg: ~/.gajim/sounds/, DATADIR/sounds...). :return the path to file or None if it doesn't exists. """ -if not file: +if not file_: return None -elif os.path.exists(file): -return file +elif os.path.exists(file_): +return file_ for d in dirs: -d = os.path.join(d, 'sounds', file) +d = os.path.join(d, 'sounds', file_) if os.path.exists(d): return d return None -def strip_soundfile_path(file, dirs=(gajim.gajimpaths.data_root, +def strip_soundfile_path(file_, dirs=(gajim.gajimpaths.data_root, gajim.DATA_DIR), abs=True): """ Remove knowns paths from a sound file Filechooser returns absolute path. If path is a known fallback path, we remove it. So config have no hardcoded pathto DATA_DIR and text in textfield is shorther. -param: file: the filename to strip. +param: file_: the filename to strip. param: dirs: list of knowns paths from which the filename should be stripped. param: abs: force absolute path on dirs """ -if not file: +if not file_: return None -name = os.path.basename(file) +name = os.path.basename(file_) for d in dirs: d = os.path.join(d, 'sounds', name) if abs: d = os.path.abspath(d) -if file == d: +if file_ == d: return name -return file +return file_ def play_sound_file(path_to_soundfile): if path_to_soundfile == 'beep': ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: update version number
changeset 589f0e14b5c0 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=589f0e14b5c0 description: update version number diffstat: nbxmpp/__init__.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (9 lines): diff -r d77b742c84cb -r 589f0e14b5c0 nbxmpp/__init__.py --- a/nbxmpp/__init__.pySat Mar 01 20:53:52 2014 +0100 +++ b/nbxmpp/__init__.pySat Mar 01 21:26:17 2014 +0100 @@ -17,4 +17,4 @@ from .plugin import PlugIn from .smacks import Smacks -__version__ = "0.3.2" +__version__ = "0.3.3" ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: Disable SCRAM-SHA-1-PLUS if channel binding is no...
changeset 74fbe875e750 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=74fbe875e750 description: Disable SCRAM-SHA-1-PLUS if channel binding is not supported. Fixes #20 diffstat: nbxmpp/auth_nb.py | 6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diffs (16 lines): diff -r 589f0e14b5c0 -r 74fbe875e750 nbxmpp/auth_nb.py --- a/nbxmpp/auth_nb.py Sat Mar 01 21:26:17 2014 +0100 +++ b/nbxmpp/auth_nb.py Tue Mar 04 17:46:08 2014 +0100 @@ -188,8 +188,10 @@ # Password based authentication mechanism ordered by strength. # If the server supports a mechanism disable all weaker mechanisms. -password_auth_mechs_strength = ('SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', -'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2') +password_auth_mechs_strength = ['SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', +'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2'] +if self.channel_binding == None: +password_auth_mechs_strength.remove('SCRAM-SHA-1-PLUS') for i in range(0, len(password_auth_mechs_strength)): if password_auth_mechs_strength[i] in self.mecs: for m in password_auth_mechs_strength[i + 1:]: ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: update version number
changeset d3089cb1164e in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=d3089cb1164e description: update version number diffstat: nbxmpp/__init__.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (9 lines): diff -r 900625d7869c -r d3089cb1164e nbxmpp/__init__.py --- a/nbxmpp/__init__.pyMon Jan 27 16:28:32 2014 +0100 +++ b/nbxmpp/__init__.pyMon Jan 27 20:18:13 2014 +0100 @@ -17,4 +17,4 @@ from .plugin import PlugIn from .smacks import Smacks -__version__ = "0.3" +__version__ = "0.3.1" ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: Add ability to configure TLS protocol version.
changeset 900625d7869c in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=900625d7869c description: Add ability to configure TLS protocol version. Add support for tls_version parameter. Fixes #17 diffstat: nbxmpp/bosh.py | 6 -- nbxmpp/client_nb.py | 10 ++ nbxmpp/tls_nb.py| 22 +- nbxmpp/transports_nb.py | 14 -- 4 files changed, 39 insertions(+), 13 deletions(-) diffs (194 lines): diff -r 1196b6ac3d82 -r 900625d7869c nbxmpp/bosh.py --- a/nbxmpp/bosh.pyTue Feb 18 09:27:16 2014 +0100 +++ b/nbxmpp/bosh.pyMon Jan 27 16:28:32 2014 +0100 @@ -40,9 +40,9 @@ class NonBlockingBOSH(NonBlockingTransport): def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, -certs, cipher_list, xmpp_server, domain, bosh_dict, proxy_creds): +certs, tls_version, cipher_list, xmpp_server, domain, bosh_dict, proxy_creds): NonBlockingTransport.__init__(self, raise_event, on_disconnect, -idlequeue, estabilish_tls, certs, cipher_list) +idlequeue, estabilish_tls, certs, tls_version, cipher_list) self.bosh_sid = None if locale.getdefaultlocale()[0]: @@ -70,6 +70,7 @@ self.bosh_secure = 'true' else: self.bosh_secure = 'false' +self.tls_version = tls_version self.cipher_list = cipher_list self.use_proxy_auth = bosh_dict['useauth'] self.proxy_creds = proxy_creds @@ -451,6 +452,7 @@ on_disconnect=self.disconnect, idlequeue = self.idlequeue, estabilish_tls = self.estabilish_tls, +tls_version = self.tls_version, cipher_list = self.cipher_list, certs = self.certs, on_http_request_possible = self.on_http_request_possible, diff -r 1196b6ac3d82 -r 900625d7869c nbxmpp/client_nb.py --- a/nbxmpp/client_nb.py Tue Feb 18 09:27:16 2014 +0100 +++ b/nbxmpp/client_nb.py Mon Jan 27 16:28:32 2014 +0100 @@ -163,19 +163,19 @@ values for keys 'host' and 'port' - connection details for proxy serve and optionally keys 'user' and 'pass' as proxy credentials :param secure_tuple: tuple of (desired connection type, cacerts, -mycerts, cipher_list) +mycerts, tls_version, cipher_list) connection type can be 'ssl' - TLS established after TCP connection, 'tls' - TLS established after negotiation with starttls, or 'plain'. -cacerts, mycerts, cipher_list - see tls_nb.NonBlockingTLS +cacerts, mycerts, tls_version, cipher_list - see tls_nb.NonBlockingTLS constructor for more details """ self.on_connect = on_connect self.on_connect_failure=on_connect_failure self.on_proxy_failure = on_proxy_failure self.on_stream_error_cb = on_stream_error_cb -self.desired_security, self.cacerts, self.mycerts, self.cipher_list = \ -secure_tuple +self.desired_security, self.cacerts, self.mycerts, self.tls_version, \ +self.cipher_list = secure_tuple self.Connection = None self.Port = port self.proxy = proxy @@ -212,6 +212,7 @@ idlequeue=self.idlequeue, estabilish_tls=establish_tls, certs=certs, +tls_version = self.tls_version, cipher_list = self.cipher_list, proxy_creds=(proxy_user, proxy_pass), xmpp_server=(self.xmpp_hostname, self.Port), @@ -234,6 +235,7 @@ idlequeue=self.idlequeue, estabilish_tls=establish_tls, certs=certs, +tls_version = self.tls_version, cipher_list = self.cipher_list, proxy_dict=proxy_dict) diff -r 1196b6ac3d82 -r 900625d7869c nbxmpp/tls_nb.py --- a/nbxmpp/tls_nb.py Tue Feb 18 09:27:16 2014 +0100 +++ b/nbxmpp/tls_nb.py Mon Jan 27 16:28:32 2014 +0100 @@ -250,11 +250,14 @@ PyOpenSSLWrapper. """ -def __init__(self, cacerts, mycerts, cipher_list): +def __init__(self, cacerts, mycerts, tls_version, cipher_list): """ :param cacerts: path to pem file with certificates of known XMPP servers :param mycerts: path to pem file with certificates of user trusted servers +:param tls_version: The lowest supported TLS version. If None is +provided, version 1.0 is used. For example setting to 1.1 will +enable TLS 1.1, TLS 1.2 and all further protocols :param cipher_list: list of ciphers to use when connection to server. If None is provided, a default list is used: HIGH:!aNULL:RC4-SHA """ @@ -2
python-nbxmpp: Check nonce returned from server during SCRAM-SHA...
changeset c814c6f856f6 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=c814c6f856f6 description: Check nonce returned from server during SCRAM-SHA-1 authentication. The first part of server nonce muss be the nonce send by client. Fixes #19 diffstat: nbxmpp/auth_nb.py | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diffs (35 lines): diff -r 7ae3ec7d4e3f -r c814c6f856f6 nbxmpp/auth_nb.py --- a/nbxmpp/auth_nb.py Tue Feb 25 10:38:31 2014 +0100 +++ b/nbxmpp/auth_nb.py Tue Feb 25 16:36:56 2014 +0100 @@ -391,7 +391,11 @@ self.scram_step = 1 self.scram_soup += ',' + data + ',' data = scram_parse(data) -# TODO: Should check cnonce here. +# Check server nonce here. +# The first part of server nonce muss be the nonce send by client. +if (data['r'][:len(self.client_nonce)] != self.client_nonce): +on_auth_fail('Server nonce is incorrect') +raise NodeProcessed # TODO: Channel binding data goes in here too. r = 'c=' + scram_base64(self.scram_gs2) r += ',r=' + data['r'] @@ -424,6 +428,7 @@ self._owner.send(str(node)) raise NodeProcessed +# DIGEST-MD5 # magic foo... chal = challenge_splitter(data) if not self.realm and 'realm' in chal: @@ -468,8 +473,8 @@ def set_password(self, password): self.password = '' if password is None else password if self.mechanism == 'SCRAM-SHA-1': -nonce = '%x' % rndg.getrandbits(196) -self.scram_soup = 'n=' + self.username + ',r=' + nonce +self.client_nonce = '%x' % rndg.getrandbits(196) +self.scram_soup = 'n=' + self.username + ',r=' + self.client_nonce self.scram_gs2 = 'n,,' # No CB yet. sasl_data = base64.b64encode((self.scram_gs2 + self.scram_soup).\ encode('utf-8')).decode('utf-8').replace('\n', '') ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: Detect downgrade attacks from SCRAM-SHA-1-PLUS to...
changeset 0d37fed94c68 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=0d37fed94c68 description: Detect downgrade attacks from SCRAM-SHA-1-PLUS to SCRAM-SHA-1. Fixes #16 diffstat: nbxmpp/auth_nb.py | 7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diffs (17 lines): diff -r cbe73e43ed82 -r 0d37fed94c68 nbxmpp/auth_nb.py --- a/nbxmpp/auth_nb.py Wed Feb 26 10:18:08 2014 +0100 +++ b/nbxmpp/auth_nb.py Wed Feb 26 11:22:41 2014 +0100 @@ -463,7 +463,12 @@ self.client_nonce = '%x' % rndg.getrandbits(196) self.scram_soup = 'n=' + self.username + ',r=' + self.client_nonce if self.mechanism == 'SCRAM-SHA-1': -self.scram_gs2 = 'n,,' # No CB yet. +if self.channel_binding == None: +# Client doesn't support Channel Binding +self.scram_gs2 = 'n,,' # No CB yet. +else: +# Client supports CB, but server doesn't support CB +self.scram_gs2 = 'y,,' else: self.scram_gs2 = 'p=tls-unique,,' sasl_data = base64.b64encode((self.scram_gs2 + self.scram_soup).\ ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: SCRAM-SHA-1-PLUS authentication mechanism
changeset cbe73e43ed82 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=cbe73e43ed82 description: SCRAM-SHA-1-PLUS authentication mechanism Fixes #16 diffstat: nbxmpp/auth_nb.py | 38 -- nbxmpp/client_nb.py | 10 +- nbxmpp/tls_nb.py| 10 ++ 3 files changed, 47 insertions(+), 11 deletions(-) diffs (152 lines): diff -r fb32c66edf77 -r cbe73e43ed82 nbxmpp/auth_nb.py --- a/nbxmpp/auth_nb.py Mon Dec 30 21:22:56 2013 +0100 +++ b/nbxmpp/auth_nb.py Wed Feb 26 10:18:08 2014 +0100 @@ -88,7 +88,7 @@ return dict_ def _scram_parse(chatter): -"""Helper function. Used for SCRAM-SHA-1 authentication""" +"""Helper function. Used for SCRAM-SHA-1, SCRAM-SHA-1-PLUS authentication""" return dict(s.split('=', 1) for s in chatter.split(',')) class SASL(PlugIn): @@ -97,16 +97,19 @@ to start authentication """ -def __init__(self, username, password, on_sasl): +def __init__(self, username, password, on_sasl, channel_binding): """ :param username: XMPP username :param password: XMPP password :param on_sasl: Callback, will be called after each SASL auth-step. +:param channel_binding: TLS channel binding data, None if the + binding data is not available """ PlugIn.__init__(self) self.username = username self.password = password self.on_sasl = on_sasl +self.channel_binding = channel_binding self.realm = None def plugin(self, owner): @@ -213,6 +216,13 @@ raise NodeProcessed except kerberos.GSSError as e: log.info('GSSAPI authentication failed: %s' % str(e)) +if 'SCRAM-SHA-1-PLUS' in self.mecs and self.channel_binding != None: +self.mecs.remove('SCRAM-SHA-1-PLUS') +self.mechanism = 'SCRAM-SHA-1-PLUS' +self._owner._caller.get_password(self.set_password, self.mechanism) +self.scram_step = 0 +self.startsasl = SASL_IN_PROCESS +raise NodeProcessed if 'SCRAM-SHA-1' in self.mecs: self.mecs.remove('SCRAM-SHA-1') self.mechanism = 'SCRAM-SHA-1' @@ -241,8 +251,9 @@ self.startsasl = SASL_IN_PROCESS raise NodeProcessed self.startsasl = SASL_FAILURE -log.info('I can only use EXTERNAL, SCRAM-SHA-1, DIGEST-MD5, GSSAPI and ' -'PLAIN mecanisms.') +log.info('I can only use ANONYMOUS, EXTERNAL, GSSAPI, SCRAM-SHA-1-PLUS,' + ' SCRAM-SHA-1, DIGEST-MD5, PLAIN and X-MESSENGER-OAUTH2' + ' mechanisms.') if self.on_sasl: self.on_sasl() return @@ -288,7 +299,7 @@ reason = challenge on_auth_fail(reason) elif challenge.getName() == 'success': -if self.mechanism == 'SCRAM-SHA-1': +if self.mechanism in ('SCRAM-SHA-1', 'SCRAM-SHA-1-PLUS'): # check data-with-success data = _scram_parse(data) if data['v'] != scram_base64(self.scram_ServerSignature): @@ -332,7 +343,7 @@ self._owner.send(Node('response', attrs={'xmlns': NS_SASL}, payload=response).__str__()) raise NodeProcessed -if self.mechanism == 'SCRAM-SHA-1': +if self.mechanism in ('SCRAM-SHA-1', 'SCRAM-SHA-1-PLUS'): hashfn = hashlib.sha1 def HMAC(k, s): @@ -368,8 +379,12 @@ if (data['r'][:len(self.client_nonce)] != self.client_nonce): on_auth_fail('Server nonce is incorrect') raise NodeProcessed -# TODO: Channel binding data goes in here too. -r = 'c=' + scram_base64(self.scram_gs2) +if self.mechanism == 'SCRAM-SHA-1': +r = 'c=' + scram_base64(self.scram_gs2) +else: +# Channel binding data goes in here too. +r = 'c=' + scram_base64(self.scram_gs2 + + self.channel_binding) r += ',r=' + data['r'] self.scram_soup += r self.scram_soup = self.scram_soup.encode('utf-8') @@ -444,10 +459,13 @@ def set_password(self, password): self.password = '' if password is None else password -if self.mechanism == 'SCRAM-SHA-1': +if self.mechanism in ('SCRAM-SHA-1', 'SCRAM-SHA-1-PLUS'): self.client_nonce = '%x' % rndg.getrandbits(196) self.scram_soup = 'n=' + self.username + ',r=' + self.client_nonce -self.scram_gs2 = 'n,,' # No CB yet. +if self.mechanism == 'SCRAM-SHA-1': +self.scram_gs2 = 'n,,' # No CB yet. +else: +self.scram_gs2 = 'p=tls-unique,,'
gajim: Set parent for server error dialog in disco
changeset eac03906371e in /home/hg/repos/gajim author: Denis Fomin branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=eac03906371e description: Set parent for server error dialog in disco diffstat: src/disco.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (13 lines): diff -r 0cb55c12b4b0 -r eac03906371e src/disco.py --- a/src/disco.py Tue Jan 14 22:48:51 2014 +0100 +++ b/src/disco.py Sat Jan 18 11:44:25 2014 +0400 @@ -832,7 +832,8 @@ jid = helpers.parse_jid(jid) except helpers.InvalidFormat as s: pritext = _('Invalid Server Name') -dialogs.ErrorDialog(pritext, str(s)) +dialogs.ErrorDialog(pritext, str(s), +transient_for=self.window) return if jid == self.jid: # jid has not changed return ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: Support for sha256 fingerprint.
changeset 21e37fe416a6 in /home/hg/repos/gajim author: Fedor Brunner branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=21e37fe416a6 description: Support for sha256 fingerprint. Fixes #7628 diffstat: src/common/config.py | 1 + src/common/connection.py | 38 --- src/common/connection_handlers_events.py | 6 +++- src/config.py| 12 ++--- src/dialogs.py | 8 +- src/gui_interface.py | 30 6 files changed, 68 insertions(+), 27 deletions(-) diffs (232 lines): diff -r eac03906371e -r 21e37fe416a6 src/common/config.py --- a/src/common/config.py Sat Jan 18 11:44:25 2014 +0400 +++ b/src/common/config.py Tue Jan 21 15:27:41 2014 +0100 @@ -354,6 +354,7 @@ 'warn_when_insecure_ssl_connection': [ opt_bool, True, _('Show a warning dialog before using standard SSL library.') ], 'warn_when_insecure_password': [ opt_bool, True, _('Show a warning dialog before sending PLAIN password over a plain connection.') ], 'ssl_fingerprint_sha1': [ opt_str, '', '', True ], +'ssl_fingerprint_sha256': [ opt_str, '', '', True ], 'ignore_ssl_errors': [ opt_str, '', _('Space separated list of ssl errors to ignore.') ], 'use_srv': [ opt_bool, True, '', True ], 'use_custom_host': [ opt_bool, False, '', True ], diff -r eac03906371e -r 21e37fe416a6 src/common/connection.py --- a/src/common/connection.py Sat Jan 18 11:44:25 2014 +0400 +++ b/src/common/connection.py Tue Jan 21 15:27:41 2014 +0100 @@ -1408,27 +1408,46 @@ text += _('\nSSL Error: %s') % ssl_error[errnum] else: text += _('\nUnknown SSL error: %d') % errnum -fingerprint = cert.digest('sha1').decode('utf-8') +fingerprint_sha1 = cert.digest('sha1').decode('utf-8') +fingerprint_sha256 = cert.digest('sha256').decode('utf-8') pem = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, cert).decode('utf-8') gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self, error_text=text, error_num=errnum, cert=pem, -fingerprint=fingerprint, certificate=cert)) +fingerprint_sha1=fingerprint_sha1, +fingerprint_sha256=fingerprint_sha256, certificate=cert)) return True if cert: -fingerprint = cert.digest('sha1').decode('utf-8') -saved_fingerprint = gajim.config.get_per('accounts', self.name, +fingerprint_sha1 = cert.digest('sha1').decode('utf-8') +fingerprint_sha256 = cert.digest('sha256').decode('utf-8') +saved_fingerprint_sha1 = gajim.config.get_per('accounts', self.name, 'ssl_fingerprint_sha1') -if saved_fingerprint: +if saved_fingerprint_sha1: # Check sha1 fingerprint -if fingerprint != saved_fingerprint: +if fingerprint_sha1 != saved_fingerprint_sha1: gajim.nec.push_incoming_event(FingerprintErrorEvent(None, conn=self, certificate=cert, -new_fingerprint=fingerprint)) +new_fingerprint_sha1=fingerprint_sha1, +new_fingerprint_sha256=fingerprint_sha256)) return True else: gajim.config.set_per('accounts', self.name, -'ssl_fingerprint_sha1', fingerprint) +'ssl_fingerprint_sha1', fingerprint_sha1) + +saved_fingerprint_sha256 = gajim.config.get_per('accounts', self.name, +'ssl_fingerprint_sha256') +if saved_fingerprint_sha256: +# Check sha256 fingerprint +if fingerprint_sha256 != saved_fingerprint_sha256: +gajim.nec.push_incoming_event(FingerprintErrorEvent(None, +conn=self, certificate=con.Connection.ssl_certificate, +new_fingerprint_sha1=fingerprint_sha1, +new_fingerprint_sha256=fingerprint_sha256)) +return True +else: +gajim.config.set_per('accounts', self.name, +'ssl_fingerprint_sha256', fingerprint_sha256) + if not check_X509.check_certificate(cert, hostname) and \ '100' not in gajim.config.get_per('accounts', self.name, 'ignore_ssl_errors').split(): @@ -1439,7 +1458,8 @@ hostname gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self, error_text=txt, error_num=100, cert=pem, -fingerprint=fingerprint, certificate=cert
gajim: send jabber:iq:last to bare jid when contact is offline. ...
changeset 4a28b4224af1 in /home/hg/repos/gajim author: Yann Leboulanger branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=4a28b4224af1 description: send jabber:iq:last to bare jid when contact is offline. Fixes #7610 diffstat: src/vcard.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r b133c7299af2 -r 4a28b4224af1 src/vcard.py --- a/src/vcard.py Wed Jan 01 20:49:53 2014 +0100 +++ b/src/vcard.py Wed Jan 01 22:32:00 2014 +0100 @@ -439,7 +439,7 @@ self.contact.jid) else: gajim.connections[self.account].request_last_status_time( -self.contact.jid, self.contact.resource) +self.contact.jid, '') # do not wait for os_info if contact is not connected or has error # additional check for observer is needed, as show is offline for him ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: Ubuntu 12.04.4 package python-openssl (0.12-1ubun...
changeset 7adb303d4839 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=7adb303d4839 description: Ubuntu 12.04.4 package python-openssl (0.12-1ubuntu2.1) is based on an older version of pyOpenSSL. In this version of pyOpenSSL OpenSSL.SSL.OPENSSL_VERSION_NUMBER is not defined. Fixes: #18 diffstat: nbxmpp/tls_nb.py | 26 +++--- 1 files changed, 15 insertions(+), 11 deletions(-) diffs (36 lines): diff -r d3089cb1164e -r 7adb303d4839 nbxmpp/tls_nb.py --- a/nbxmpp/tls_nb.py Mon Jan 27 20:18:13 2014 +0100 +++ b/nbxmpp/tls_nb.py Wed Jan 29 16:47:10 2014 +0100 @@ -374,17 +374,21 @@ # py-OpenSSL < 0.9 or old OpenSSL flags |= 16384 -# OpenSSL 1.0.1d supports TLS 1.1 and TLS 1.2 and -# fixes renegotiation in TLS 1.1, 1.2 by using the correct TLS version. -if OpenSSL.SSL.OPENSSL_VERSION_NUMBER >= 0x1000104f: -if self.tls_version != '1.0': -flags |= OpenSSL.SSL.OP_NO_TLSv1 -if self.tls_version not in ('1.0', '1.1'): -try: -flags |= OpenSSL.SSL.OP_NO_TLSv1_1 -except AttributeError, e: -# older py-OpenSSL -flags |= 0x1000 +try: +# OpenSSL 1.0.1d supports TLS 1.1 and TLS 1.2 and +# fixes renegotiation in TLS 1.1, 1.2 by using the correct TLS version. +if OpenSSL.SSL.OPENSSL_VERSION_NUMBER >= 0x1000104f: +if self.tls_version != '1.0': +flags |= OpenSSL.SSL.OP_NO_TLSv1 +if self.tls_version not in ('1.0', '1.1'): +try: +flags |= OpenSSL.SSL.OP_NO_TLSv1_1 +except AttributeError, e: +# older py-OpenSSL +flags |= 0x1000 +except AttributeError, e: +pass # much older py-OpenSSL + tcpsock._sslContext.set_options(flags) ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: Fix typos
changeset 7ae3ec7d4e3f in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=7ae3ec7d4e3f description: Fix typos diffstat: nbxmpp/client_nb.py | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diffs (52 lines): diff -r f66e38242da5 -r 7ae3ec7d4e3f nbxmpp/client_nb.py --- a/nbxmpp/client_nb.py Wed Feb 19 10:30:13 2014 +0100 +++ b/nbxmpp/client_nb.py Tue Feb 25 10:38:31 2014 +0100 @@ -17,7 +17,7 @@ # $Id: client.py,v 1.52 2006/01/02 19:40:55 normanr Exp $ """ -Client class establishs connection to XMPP Server and handles authentication +Client class establishes connection to XMPP Server and handles authentication """ import socket @@ -32,7 +32,7 @@ """ Client class is XMPP connection mountpoint. Objects for authentication, network communication, roster, xml parsing ... are plugged to client object. -Client implements the abstract behavior - mostly negotioation and callbacks +Client implements the abstract behavior - mostly negotiation and callbacks handling, whereas underlying modules take care of feature-specific logic """ @@ -154,10 +154,10 @@ Open XMPP connection (open XML streams in both directions) :param on_connect: called after stream is successfully opened -:param on_connect_failure: called when error occures during connection +:param on_connect_failure: called when error occurs during connection :param hostname: hostname of XMPP server from SRV request :param port: port number of XMPP server -:param on_proxy_failure: called if error occurres during TCP connection +:param on_proxy_failure: called if error occurs during TCP connection to proxy server or during proxy connecting process :param proxy: dictionary with proxy data. It should contain at least values for keys 'host' and 'port' - connection details for proxy @@ -425,7 +425,7 @@ def _tls_negotiation_handler(self, con=None, tag=None): """ -Take care of TLS negotioation with +Take care of TLS negotiation with """ log.info('-tls_negotiaton_handler() >> tag: %s' % tag) if not con and not tag: @@ -449,7 +449,7 @@ # because negotiation with BOSH is forbidden self.Connection.tls_init( on_succ = lambda: self._xmpp_connect(socket_type='tls'), -on_fail = lambda: self.disconnect('error while etabilishing TLS')) +on_fail = lambda: self.disconnect('error while establishing TLS')) def _on_connect(self): """ ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
python-nbxmpp: Add possibility to restrict authentication mechan...
changeset d77b742c84cb in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=d77b742c84cb description: Add possibility to restrict authentication mechanisms used during login. Fixes #20 diffstat: nbxmpp/auth_nb.py | 36 +--- nbxmpp/client_nb.py | 19 --- 2 files changed, 45 insertions(+), 10 deletions(-) diffs (144 lines): diff -r 0d37fed94c68 -r d77b742c84cb nbxmpp/auth_nb.py --- a/nbxmpp/auth_nb.py Wed Feb 26 11:22:41 2014 +0100 +++ b/nbxmpp/auth_nb.py Sat Mar 01 20:53:52 2014 +0100 @@ -91,25 +91,35 @@ """Helper function. Used for SCRAM-SHA-1, SCRAM-SHA-1-PLUS authentication""" return dict(s.split('=', 1) for s in chatter.split(',')) +SASL_AUTHENTICATION_MECHANISMS = \ +set(['ANONYMOUS', 'EXTERNAL', 'GSSAPI', 'SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', + 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2']) + class SASL(PlugIn): """ Implements SASL authentication. Can be plugged into NonBlockingClient to start authentication """ -def __init__(self, username, password, on_sasl, channel_binding): +def __init__(self, username, password, on_sasl, channel_binding, + auth_mechs): """ :param username: XMPP username :param password: XMPP password :param on_sasl: Callback, will be called after each SASL auth-step. :param channel_binding: TLS channel binding data, None if the binding data is not available +:param auth_mechs: Set of valid authentication mechanisms. + Possible entries are: + 'ANONYMOUS', 'EXTERNAL', 'GSSAPI', 'SCRAM-SHA-1-PLUS', + 'SCRAM-SHA-1', 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2' """ PlugIn.__init__(self) self.username = username self.password = password self.on_sasl = on_sasl self.channel_binding = channel_binding +self.enabled_auth_mechs = auth_mechs self.realm = None def plugin(self, owner): @@ -146,7 +156,7 @@ Start authentication. Result can be obtained via "SASL.startsasl" attribute and will be either SASL_SUCCESS or SASL_FAILURE -Note that successfull auth will take at least two Dispatcher.Process() +Note that successful auth will take at least two Dispatcher.Process() calls. """ if self.startsasl: @@ -169,10 +179,22 @@ self.startsasl='not-supported' log.info('SASL not supported by server') return -self.mecs = [] -for mec in feats.getTag('mechanisms', namespace=NS_SASL).getTags( -'mechanism'): -self.mecs.append(mec.getData()) + +self.mecs = set( +mec.getData() +for mec +in feats.getTag('mechanisms', namespace=NS_SASL).getTags('mechanism') +) & self.enabled_auth_mechs + +# Password based authentication mechanism ordered by strength. +# If the server supports a mechanism disable all weaker mechanisms. +password_auth_mechs_strength = ('SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', +'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2') +for i in range(0, len(password_auth_mechs_strength)): +if password_auth_mechs_strength[i] in self.mecs: +for m in password_auth_mechs_strength[i + 1:]: +self.mecs.discard(m) +break self._owner.RegisterHandler('challenge', self.SASLHandler, xmlns=NS_SASL) @@ -519,7 +541,7 @@ class NonBlockingNonSASL(PlugIn): """ -Implements old Non-SASL (JEP-0078) authentication used in jabberd1.4 and +Implements old Non-SASL (XEP-0078) authentication used in jabberd1.4 and transport authentication """ diff -r 0d37fed94c68 -r d77b742c84cb nbxmpp/client_nb.py --- a/nbxmpp/client_nb.py Wed Feb 26 11:22:41 2014 +0100 +++ b/nbxmpp/client_nb.py Sat Mar 01 20:53:52 2014 +0100 @@ -23,6 +23,7 @@ import socket from . import transports_nb, dispatcher_nb, auth_nb, roster_nb, protocol, bosh from .protocol import NS_TLS +from .auth_nb import SASL_AUTHENTICATION_MECHANISMS import logging log = logging.getLogger('nbxmpp.client_nb') @@ -471,7 +472,8 @@ ### follows code for authentication, resource bind, session and roster download ### -def auth(self, user, password, resource='', sasl=True, on_auth=None): +def auth(self, user, password, resource='', sasl=True, on_auth=None, + auth_mechs=None): """ Authenticate connnection and bind resource. If resource is not provided random one or library name used @@ -482,6 +484,11 @@ :param sasl: Boolean indicating if SASL shall be used. (default: True) :param on_auth: Callback, called after auth. On auth failure,
python-nbxmpp: add NS_MSG_HINTS
changeset f66e38242da5 in /home/hg/repos/python-nbxmpp details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=f66e38242da5 description: add NS_MSG_HINTS diffstat: nbxmpp/__init__.py | 2 +- nbxmpp/protocol.py | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diffs (20 lines): diff -r 7adb303d4839 -r f66e38242da5 nbxmpp/__init__.py --- a/nbxmpp/__init__.pyWed Jan 29 16:47:10 2014 +0100 +++ b/nbxmpp/__init__.pyWed Feb 19 10:30:13 2014 +0100 @@ -17,4 +17,4 @@ from .plugin import PlugIn from .smacks import Smacks -__version__ = "0.3.1" +__version__ = "0.3.2" diff -r 7adb303d4839 -r f66e38242da5 nbxmpp/protocol.py --- a/nbxmpp/protocol.pyWed Jan 29 16:47:10 2014 +0100 +++ b/nbxmpp/protocol.pyWed Feb 19 10:30:13 2014 +0100 @@ -81,6 +81,7 @@ NS_GATEWAY= 'jabber:iq:gateway' # XEP-0100 NS_GEOLOC = 'http://jabber.org/protocol/geoloc' # XEP-0080 NS_GROUPCHAT = 'gc-1.0' +NS_MSG_HINTS = 'urn:xmpp:hints' # XEP-0280 NS_HTTP_AUTH = 'http://jabber.org/protocol/http-auth'# XEP-0070 NS_HTTP_BIND = 'http://jabber.org/protocol/httpbind' # XEP-0124 NS_IBB= 'http://jabber.org/protocol/ibb' ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits