Commit Graph

547 Commits

Author SHA1 Message Date
Stephan Erb e00f871b26 Use hashlib module in favor of sha and md5. 2009-01-08 16:51:26 +00:00
Stephan Erb cca10e6d29 A few more coding standards and readability improvements in client_nb.py. 2009-01-08 16:30:27 +00:00
Stephan Erb 10449444dd Switch to SSL version 3 as the channel encryption protocol. As of http://docs.python.org/dev/library/ssl.html this is the maximally compatible SSL variant. 2009-01-08 16:14:26 +00:00
Stephan Erb ed3de38ce5 Revert r10931. Fixes #4632. See #2634 2009-01-03 16:34:58 +00:00
Stephan Erb 28112d6681 Fix indentation error. 2008-12-31 14:04:42 +00:00
Stephan Erb 8a76efb703 Proposed Fix. Make sure we read all data from our SSL socket wrappers and don't just rely on gobject.io_add_watch, select or poll.
This isn't really a clean solution, but the less intrusives fix that I can think of. Fixes #2634.
2008-12-31 14:01:53 +00:00
Stephan Erb b2a5b1046c Remove print. 2008-12-28 14:55:23 +00:00
Stephan Erb d8a2d8f447 Backport a few XMPPPY upstream changes.
* Use namespace instead of attrs={} for addChild
 * Unplug SASL module on auth failure (we currently disconnect so don't really need it)
2008-12-28 14:53:20 +00:00
Stephan Erb f83eb5ae95 Remove two more "from protocol import *". 2008-12-28 01:52:21 +00:00
Brendan Taylor e98a648908 added licence notice to common/xmpp/c14n.py 2008-12-28 01:39:39 +00:00
Stephan Erb 7c0b1e4ed0 Module documentation for c14n.py. 2008-12-28 01:32:34 +00:00
Stephan Erb 8b3833b443 Coding standards and documentation improvements in features_nb.py. Remove unused methods. 2008-12-28 01:29:33 +00:00
Stephan Erb d7091c74a4 Remove method that was implemented for old, blocking dispatcher but is now unused. 2008-12-28 00:01:48 +00:00
Stephan Erb aa9a85767f Move module documentation ontop, so that it will show up in epydoc correctly. 2008-12-27 12:36:28 +00:00
Stephan Erb 233848aec0 Random bits in xmpp. Cosmetic only. 2008-12-27 11:45:58 +00:00
Stephan Erb b7400724b7 Coding standards and documentation improvements in dispatcher_nb.py. Many open questions remain at my side. Please check FIXMEs. 2008-12-27 11:39:52 +00:00
Stephan Erb de73b76771 Coding standards and documentation improvements in auth_nb.py 2008-12-26 15:39:18 +00:00
Stephan Erb 7427399a2a More coding standards and documentation improvements in client_nb.py 2008-12-26 15:25:57 +00:00
Stephan Erb afbac3d3e6 Coding standards and documentation improvements in idlequeue.py.
Fix a potential bug of missing an alarm_callback. Separate public from internal API.
2008-12-26 13:24:37 +00:00
Stephan Erb 40d802284e Coding standards and documentation improvements in client_nb.py 2008-12-24 14:41:26 +00:00
Stephan Erb 5139e7c8d0 Add credits and remove outdated documentation from __init__.py 2008-12-24 14:28:17 +00:00
Stephan Erb 6999e1bbb6 Make three docstrings epydoc enabled. See http://epydoc.sourceforge.net/manual-docstring.html 2008-12-24 13:56:02 +00:00
Stephan Erb 59b0216898 Remove Jacob Lundqvist's xmpp/debug.py module. We have switched to builtin python logging. 2008-12-24 13:51:15 +00:00
Stephan Erb a8cfd83c3e Move GObjectIdleQueue from gajim.py to idlequeue.py 2008-12-24 13:44:23 +00:00
Stephan Erb 6b5e9ea7ce Documentation improvements in client.py 2008-12-24 13:25:57 +00:00
Stephan Erb 9ec00eda74 Document consturctor in proxy_connector.py 2008-12-24 11:41:09 +00:00
Stephan Erb 1e00674505 Coding standards and documentation improvements in tls_nb.py 2008-12-24 11:10:58 +00:00
Stephan Erb 5c02a907b4 Coding standards and documentation improvements in transports_nb.py 2008-12-24 11:10:38 +00:00
Yann Leboulanger 45f9366d58 do'nt try starttls if stream version < 1.0. Fixes #4600 2008-12-22 09:59:35 +00:00
Yann Leboulanger 08bb703640 fix GSSAPI authentication 2008-12-18 18:16:04 +00:00
Yann Leboulanger b317ffcdae merge BOSH branch to trunk 2008-12-15 21:06:08 +00:00
Yann Leboulanger 24bb239fdb prevent traceback when server doen't include a query in jabber:iq:roster reply. Fixes #4579 2008-12-15 15:32:59 +00:00
Yann Leboulanger e389e0b16b [thorstenp] remove whitespace at eol 2008-12-03 21:56:12 +00:00
Yann Leboulanger c271d1f15a fix bad indentation 2008-12-03 21:37:54 +00:00
Yann Leboulanger 3392c54dd0 [thorstenp] fix empty exception clauses 2008-12-03 21:37:05 +00:00
Yann Leboulanger f0dce41ab6 fix string exceptions 2008-12-03 21:35:07 +00:00
Yann Leboulanger 5eb402ba4b [thorsten] pfix exceptions not inheriting from exception 2008-12-03 21:26:34 +00:00
Yann Leboulanger 60ba33eb31 [thorstenp] fix possible undefined loop variables 2008-12-03 17:38:16 +00:00
Yann Leboulanger 31dc32eeb9 [thorstenp] fix redefined builtins 2008-12-03 17:16:04 +00:00
Yann Leboulanger c163e90b10 [thorstenp] fix unused variables 2008-12-02 15:53:23 +00:00
Yann Leboulanger 7701f29beb [thorstenp] fix undefined variables 2008-12-02 15:10:31 +00:00
Yann Leboulanger e2118de64c [thorstenp] remove useless import 2008-12-02 14:44:26 +00:00
Yann Leboulanger 983301d589 [thorstenp] convert some strings to comment 2008-12-02 14:09:18 +00:00
Yann Leboulanger 11deb3b933 [thorstenp] remove useless pass 2008-12-02 14:03:32 +00:00
Yann Leboulanger 20ff72c523 [thorstenp] fix statements 2008-12-02 14:02:45 +00:00
Yann Leboulanger 3e88fdf41e check session support instead of Esession support, and announce we support it. Fixes #4429 2008-11-30 18:53:02 +00:00
Yann Leboulanger 91cc491173 [Simo Sorce] fix GSSAPI to use FQDN. See #2465 2008-11-28 07:27:42 +00:00
Yann Leboulanger 4cf9d0d622 if a SASL mechanism fails, try the others before abording authentification 2008-11-26 12:45:05 +00:00
Yann Leboulanger c69b4e90b6 detect and handle incorrect stream start. Fixes #4499 2008-11-21 10:02:16 +00:00
Yann Leboulanger 2521ea6080 [thorstenp] enable buffering of expat. see #4457 2008-11-05 20:03:27 +00:00
Yann Leboulanger 4a06659912 try to connect to next type when connection is refused (server not listening on 5223) 2008-10-22 19:59:14 +00:00
Yann Leboulanger 7ca670a303 assign variable soon enough. 2008-10-22 18:13:43 +00:00
Yann Leboulanger 6fc5ffe276 fix non blocking connect. don't block when connect fails. Fixes #4366, #4107 2008-10-21 15:50:20 +00:00
Yann Leboulanger 06ab4a7b6d revert thorstenp patches for now. They introduce bugs. 2008-10-20 21:38:06 +00:00
Yann Leboulanger f801a50260 [thorstenp] fix unused variables 2008-10-20 21:17:48 +00:00
Yann Leboulanger dc5d7bcf7c [thorstenp] fix undefined variables 2008-10-20 18:05:33 +00:00
Yann Leboulanger c2c681e05c [thorstenp] remove useless import 2008-10-20 17:54:02 +00:00
Yann Leboulanger 86271b6e3c [thorstenp] string to comment 2008-10-20 15:30:52 +00:00
Yann Leboulanger c9f3c94bb3 [thorstenp] remove useless pass 2008-10-20 15:21:26 +00:00
Yann Leboulanger 464f62d580 [thorstenp] remove statements without effect 2008-10-20 15:20:51 +00:00
Yann Leboulanger 7055eec326 fix typo 2008-10-16 18:40:00 +00:00
Yann Leboulanger 44277d6c40 prevent traceback. Fixes #4319 2008-10-16 17:19:22 +00:00
Yann Leboulanger 158538b81c [thorstenp] rename some var to not hide builts-in functions (list -> list_, ...) 2008-10-11 10:22:04 +00:00
Yann Leboulanger fd54e68e6d [thorstenp] some fixes with type() -> isinstance() 2008-10-11 10:06:49 +00:00
Yann Leboulanger 992e90208e [thorstenp] use != instead of <> 2008-10-11 10:02:49 +00:00
Yann Leboulanger 196dd7e30a [thorstenp] use isinstance rather than type(x) == y. use sorted() 2008-10-11 09:59:52 +00:00
Yann Leboulanger 00543277e4 [thorstenp] replace ` with repr 2008-10-11 09:51:27 +00:00
Yann Leboulanger 73aee40542 [thorstenp] replace none equality test with identity test 2008-10-11 09:44:12 +00:00
Yann Leboulanger ed748fdda3 [thorstenp] replace list with tuple in for and if 2008-10-11 09:42:59 +00:00
Yann Leboulanger 567f1e17c1 [thorstenp] di not use emtpy except clauses 2008-10-11 09:37:13 +00:00
Yann Leboulanger 84e717c8df [thorstenp] use startswith and endswith instead of array indices on strings 2008-10-11 09:32:59 +00:00
Yann Leboulanger 9d7c80d522 [thorstenp] replace has_key by key in dict. Fixes #4392 2008-10-07 20:41:59 +00:00
Yann Leboulanger 32b583986f [Jelmer Vernooij] Kerberos (GSSAPI) SASL authentication mechanism added 2008-09-27 14:59:12 +00:00
Yann Leboulanger 3d46bf0b6e [dwd] fix reconnection when we get wrong XML with undeclared namespaces. Fixes #3083 2008-09-27 14:26:50 +00:00
Yann Leboulanger e236382f3d handle XEP-0203 (Delayed Delivery) and use it when forwarding unread messages via adhoc commands. Fixes #4347 2008-09-26 11:11:38 +00:00
Yann Leboulanger 3e2f9fcbec prevent affiliatio spoofing by checking namespace. Fixes #4323 2008-09-16 08:30:27 +00:00
tomk a7c36048b9 - renamed src/common/nslookup.py to resolver.py
- refactored resolver code and added asynchronous resolver based on patch by Damien Thebault[1]
  * Uses libasyncns-python[2]. If it's not available, old nslookup resolver is used)
  * works for SRV requests only at the moment

[1] https://www.lagaule.org/pipermail/gajim-devel/2008-July/000460.html
[2] https://code.launchpad.net/libasyncns-python
2008-08-31 23:40:06 +00:00
tomk acdf4ff143 improved disconnect handling, added comments, fixed minor bugs 2008-08-17 22:57:48 +00:00
tomk a76c173816 - improved SSL connections with BOSH - SSL over HTTP proxy is possible now,
Gajim will do HTTP CONNECT on proxy to reach the BOSH Conn manager and try
  to estabilish TLS (same as what firefox do when approaching HTTPS server via
  proxy)
- moved proxy-connecting code to xmpp/proxy_connectors.py
- debugged SOCKS5 proxy code
- tested with Tigase server
2008-08-14 21:48:43 +00:00
tomk 4504861084 fixed handling of SSL errors 2008-08-09 12:16:42 +00:00
tomk cbfa9d97df - TLS classes refactored - NonBlockingTLS is now plugged to NonBlockingTCP and
derived (was plugged to NonBlockingClient which made it unusable for BOSH)
- Fixed HTTP CONNECT proxy socket
- Implemented workaround for the bug with insecure-connection warning dialog
  (unfortunately, this is not over - I just forbid the transport to send
  BOSH empty bodies until auth module is plugged, which is wrong and will
  break if user will wait more than "inactivity" (usualy thirty) seconds
  before clicking the dialog.
  This workaround works with ejb and opf, and also breaks connection with
  both of them if delay is too long.
- Implemented basic TLS over BOSH. It works only with OPF and poorly.
2008-08-05 23:52:35 +00:00
Yann Leboulanger 673052f1b8 handle disconnection while insecure connetion dialog is opened. fixes #4138 2008-07-30 15:43:53 +00:00
js 8605cd3f38 For historical reasons, we have a tab width of 3. This is strange, but
we have that in all files. To at least lesser the confusion a bit, add
vim tags for that.
Additionally, fix wrong #! in a few files.
2008-07-29 19:49:31 +00:00
tomk 56e0ad7a96 basic proxy authentication for BOSH connections implemented 2008-07-28 18:53:00 +00:00
tomk af3f1a9dd4 - implemented BOSH key sequencing, acknowledgements
- improved HTTP persistent connections
- added alarm-unregister method to idlequeue
- extended proxy managing dialog for BOSH proxy
2008-07-26 22:42:40 +00:00
tomk a58618c843 persistent HTTP connections in BOSH roughly implemented, added hack for openfire incapability of after-SASL-stream-restart-response in BOSH, changed doubles quotes to single 2008-07-18 00:34:49 +00:00
js 3bd76e406a Partially fix #4098.
This is, however, only a half fix as this fixes that it fails when
there's None in waiting_descriptors[2], but actually, there never
should be None, so I have to investigate why there was none.

This patch is, however, correct and needed and the other queues also
have that check. It's just that I also need to fix the reason for
the None in the queue.
2008-07-15 23:23:31 +00:00
Brendan Taylor 814c9c118a XEP-0116 support discovery 2008-07-14 00:26:05 +00:00
tomk cecce21c53 added hack for Openfire that doesn\'t add xmlns to child iqs of sent body stanzas 2008-07-13 23:10:11 +00:00
tomk 3d860f40a6 BOSHClient transformed to NonBlockingBOSH transport - it's easier to maintain more connections from below, implemented handling of non-persistent HTTP connections - it runs with ejabberd, improved NonBlockingTransport interface, minor changes in BOSHDispatcher 2008-07-13 22:22:58 +00:00
tomk e1899f34dc new BOSHDispatcher (in dispatcher_nb), improved BOSHClient class, minor changes in other xmpp modules 2008-07-07 23:04:10 +00:00
Yann Leboulanger f379d06d2c fix connection for ipv6 2008-07-03 06:26:39 +00:00
tomk 952e4a1569 moved bosh code from client_nb.py to bosh.py, replaced debug logging with debug.py by logging in whole xmpppy (debug.py is now unused) 2008-07-02 23:29:10 +00:00
tomk 937bb01a69 moved TLS and SSL classes from transports_nb to new tls_nb module, fixed HTTP CONNECT proxy transport 2008-06-30 23:02:12 +00:00
tomk f3820706fb - Refactored non-blocking transport and client classes - getaddrinfo is called
in Client now
- Added NonBlockingHttpBOSH transport (to tranports_nb) and BOSHClient
(to client_nb)
- Extended possible proxy types in configuration by "BOSH" proxy
- Rewrote NonBlockingTLS to invoke success callback only after successful TLS handshake is over (formerly, the TLS Plugin returned right after sending <starttls>)
2008-06-30 00:02:32 +00:00
js 408d3b4ff6 Revert r9859 as this killed the stream.
This isn't an easy fix, we need to stop using expat in namespace aware
mode.
2008-06-29 01:40:49 +00:00
js 23cdc3fd6f Don't disconnect on unbound prefixes.
Fixes #3083. I can't believe this was unfixed for so long, as it's
really a rather easy fix.
2008-06-29 01:25:52 +00:00
Yann Leboulanger a62328ecd3 remove duplicate function, simplify logic 2008-06-26 11:30:13 +00:00
tomk 65644ca13f added stub for new transports module plus basic test for it, testing code reorganized 2008-06-18 23:58:19 +00:00
js abdd43e5eb Type in NS. 2008-06-17 18:13:23 +00:00
js 9634f98250 * Implemented XEP-0184 section 5.
* Added NS_RECEIPTS to protocol namespace list.
* Show our support of XEP-0184 in caps.
* Added a big, fat warning to get_contact as this does not work as
  expected.
* There was some strangeness in our XEP-0022, it added an id tag to
  the x tag, which isn't mentioned anywhere in the XEP. And for some
  strange reason, that id even was the same all the time.
* Fixed a typo.
2008-06-17 16:03:21 +00:00
Yann Leboulanger 1d745c1c9d use SSLv23 method (it support SSLv2, v3 and TLSv1) instead of only TLSv1 method as some server (gmail) don't support TLSv1 method. fixes #3786 2008-06-16 14:12:59 +00:00
tomk 16e274b9ec added test script for NonBlockingClient (test/test_client_nb.py) 2008-06-12 23:54:46 +00:00
tomk 6a15c9b9c9 initial cleanup of xmpppy perfomed, see #3260 2008-06-09 00:32:02 +00:00
tomk cb2d629535 added prototype of BOSHClient class and script for usage example, removed import of common.gajim from transports_nb 2008-05-31 16:51:40 +00:00
Brendan Taylor b0aeefcbb5 flush xmpppy's send queue before disconnecting 2008-05-19 20:04:14 +00:00
Yann Leboulanger da3e8a7328 remove a connect_failure callback when we are connected. Fixes #3914 2008-05-05 08:50:07 +00:00
Yann Leboulanger a3827fe5d0 new XEP-0115 implementation (version 1.5) 2008-04-20 22:58:47 +00:00
Yann Leboulanger ef97e91a1d put namespace name in protocol.py 2008-04-18 18:19:33 +00:00
Yann Leboulanger 041969309d add many supported features to disco#info reply. fixes #3872 2008-04-18 18:10:12 +00:00
Jean-Marie Traissard 968b2acc4f http://python.org/dev/peps/pep-0008/ " Comparisons to singletons like None should always be done with
'is' or 'is not', never the equality operators."
Comparisons to None part; second one...
roster_win.py is NOT checked here (waiting for modelfilter)
2008-04-18 00:26:07 +00:00
Jean-Marie Traissard 2ce13dc40e http://python.org/dev/peps/pep-0008/ " Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators."
Comparisons to None part
roster_win.py is NOT checked here (waiting for modelfilter)
2008-04-18 00:02:56 +00:00
Yann Leboulanger 3aefee4700 try all IPs of a given host in case first one fails. Fixes #2958 2008-04-16 11:02:01 +00:00
Yann Leboulanger 3c2a220c65 handle all PyopenSSL errors. fixes #3686 2008-01-23 19:04:35 +00:00
Stephan Erb 55eed6bda6 Revert r9252 for now. E2E was affected and task is shifted to next releas anyway. See #3694 2008-01-20 23:24:03 +00:00
Stephan Erb 9e74881ed6 Merge xmpp.py 4.1 simplexml.py
See #3694


 * WARNING! Incompartible change! Now newtag=n.T.newtag do not creates new tag
but only returns existing one (if possible). If you need to create tag use
either .NT. method or attribute set (i.e. n.T.newtag=something).

 * Added CDATA extracting method to xml node.

 * added xmlns safety check

 * Fixed node attribute deletion with "del node[attr]" syntax.

 * Ordering fix for when addChild and addData are used on the same node (may increase memory usage, might need to watch for that)

 * Fixes for children node fetching, still not perfect, but much better
2008-01-18 20:55:18 +00:00
Yann Leboulanger 62924fcf38 fix traceback when we get a presence with no fram attribute. see #3666 2008-01-09 19:05:38 +00:00
Stephan Erb e25ac90068 Improving readability (little) by shifting some boolean checks to a lambda function. 2007-12-27 22:28:40 +00:00
Yann Leboulanger 14f1232308 get SSL error message where it is in Error instance 2007-12-15 12:10:25 +00:00
Yann Leboulanger b7cc062d7d [shprotx] fix loading of multiple SSL certificates and better error message. fixes #3619 2007-12-15 08:31:42 +00:00
Yann Leboulanger a645006bf8 merge diff from trunk 2007-12-12 08:44:46 +00:00
Tomasz Melcer 7f57a9d2e8 Jingle: wrongly decoded connection parameters from transport-info 2007-08-20 23:14:57 +00:00
Tomasz Melcer a6a3fbbff0 simplexml: consistent interface for xml attributes -- __contains__ 2007-08-15 09:29:27 +00:00
Tomasz Melcer b8087cdb53 Jingle: removing hacks, rising the priority for io_add_watch callbacks. 2007-08-15 09:28:32 +00:00
Tomasz Melcer c00c05dd93 Jingle: ugly temporary fix for not sending stanzas when farsight is connecting 2007-08-12 21:21:40 +00:00
Yann Leboulanger ea24ee82e5 merge diff from trunk to pep branch 2007-08-09 15:39:18 +00:00
Tomasz Melcer 459c73f961 Jingle: UI entry point and lots of small changes. 2007-08-06 23:19:57 +00:00
Yann Leboulanger c71eed99b8 set xml:lang attribute on opening XML stream. fixes #2772 2007-07-27 20:00:44 +00:00
Julien Pivotto 0314f23aa4 Add notification of Configuration Changes in MUC. See #3270.
http://www.xmpp.org/extensions/xep-0045.html#roomconfig-notify
2007-07-19 10:06:59 +00:00
Julien Pivotto 015ee132ae XEP-0045: Multi-User Chat
* Handle Multiple status code in MUC.
 * Warn the user if room logging is enabled (
http://www.xmpp.org/extensions/xep-0045.html#enter-logging ). Fix #3270.
2007-07-19 09:27:33 +00:00
Julien Pivotto 9994643247 Added my own copyright :-P 2007-07-11 21:39:27 +00:00
Tomasz Melcer 744d445c55 Caps: querying caps disco node (no checking result yet) 2007-06-27 22:32:35 +00:00
Tomasz Melcer 401a9b4c02 Some comments added. 2007-06-07 22:49:47 +00:00
Yann Leboulanger 044feb0e1f Do not use xmpppy DataForm class 2007-06-06 21:40:56 +00:00
Yann Leboulanger ecd995fda3 [omega] Don't check the fingerprint of the SSL certificats with a fixed list, but use OpenSSL to check if the certificat is valid. 2007-06-03 14:15:50 +00:00
Yann Leboulanger 5d1a78f176 [elghinn] xmpppy typo 2007-06-03 14:07:54 +00:00
Yann Leboulanger 3d4c7bf547 [elghinn] fix entity time support (xep 90 and 202) 2007-06-03 14:00:09 +00:00
Yann Leboulanger 07b324ced4 ability to see pep nodes and their access model. TODO: ability to change it 2007-06-03 10:30:34 +00:00
Piotr Gaczkowski e3ef0821b3 Merge with trunk 2007-06-03 10:04:20 +00:00
Yann Leboulanger 0e3c634ff2 new account registration wizard that follow XEP 77 better. fixes #2700 too (advanced options available while creation an account) 2007-05-31 21:49:49 +00:00
Piotr Gaczkowski 512db7618b Lame Mood and Activity support. Announcing caps. 2007-03-28 21:18:16 +00:00
Yann Leboulanger efaa1a18e7 add a now argument to the send function, so that stanza is sent instantly instead of added to queue. Use it to send answer to adhoc command when we disconnect. fixes #3008 and #2808 2007-03-15 12:53:29 +00:00
junglecow bbed22a410 - Workaround for #2846: Make the error silent. Fixes #2846.
- Workaround for #2838: Use synchronous (blocking) SSL handshake. Fixes #2838.
2007-03-03 20:13:43 +00:00
Yann Leboulanger cba44a43a1 handle proxy errors. fixes #799 (socks5 proxies should now be supported. tests needed) 2007-02-07 22:05:52 +00:00
Yann Leboulanger 0ec4aa3676 [smoku] fix SASL auth. fixes #1911 2007-02-06 08:57:59 +00:00
Yann Leboulanger f450c0eb65 [misc] XEP-0199 (Xmp ping) support.fixes #2947 2007-01-27 10:19:53 +00:00
Yann Leboulanger 852974efa7 ability to set and receive an empty subject. fixes #2938 2007-01-26 18:30:45 +00:00
Yann Leboulanger 9a6b090506 begining of socks5 proxy support. error handling is missing. see #799 2007-01-24 21:50:59 +00:00
junglecow 37ffd5585b Removed an old-style logging command, as _owner may not always exist. Partial attempt at #2928 2007-01-23 20:06:07 +00:00
Yann Leboulanger 3567a8c20f remove privacy list from dialog only when server return the result, else show an error dialog. fixes #2853 2007-01-11 20:21:53 +00:00
junglecow 9814451e07 - [dcraven] Fixed spelling error. Fixes #2580.
- Demoted some error messages from error to debug level.
2007-01-01 02:11:15 +00:00
junglecow 5529852ded - Fix TB on fingerprint mismatch
- Add debug message on import failure of PyOpenSSL
 - Update gajim.org digest after migration to new server
2006-12-29 01:46:46 +00:00
Yann Leboulanger 70bf104cfc [misc] XEP-0202 (Entity Time) support. fixes #2830 2006-12-28 16:27:41 +00:00
junglecow e1ad5b15d0 - Removed unnecessary import
- Fixed name of transport_nb's logger
2006-12-28 11:15:44 +00:00
junglecow c16642c838 Catch socket.gaierror. Fixes #2840. 2006-12-27 22:45:23 +00:00
junglecow e816b38a0f Check if self._sock exists before trying to close it. Fixes #2839. 2006-12-27 20:44:21 +00:00
junglecow 5f16eb633b Re-deleted exc_clear. Reason:
- It's unnecessary
 - It confuses people

See [7433] and #1575. This is an old workaround for psyco braindeadness, which
we don't use anymore. If there's a reason this should stay in code, please
document clearly, and re-add. Thanks.
2006-12-27 18:57:30 +00:00
junglecow 847d9fe6e9 - Enhanced parsing of -l/--loglevel option
- Demote one message w/exception to debug
 - Hopefully improved user error message when fingerprint is bad
2006-12-27 18:38:50 +00:00
Nikos Kouremenos 64dec82bb6 readd something, unless there is a reason it got removed in [7706] 2006-12-27 06:09:15 +00:00
junglecow 9deb76a8ad - Started new way of logging, with configurable level for each subsystem
- Added -q, --quiet (speaks for itself)
   - Added -l, --loglevel subsystem=LEVEL,subsystem2=LEVEL2,...
 - Quell winsock 10035 error. (Equivalent of EINPROGRESS, but winsock likes to have its own error numbers.)
 - Hide SSL certificate debug stuff unless gajim.c.x.transports loglevel is DEBUG or lower
 - Avoid unicode problems if we set a profile
 - Move fingerprint checks from _register_handlers to _connect_success
 - Some enhancements to fpr checking code
2006-12-23 21:18:07 +00:00
junglecow 44674f7e75 - Implement matching of fingerprints against servers.xml
- Add support for fingerprints to servers.xml parser.
 - Add support for 'hidden' servers to servers.xml parser.
 - Add some fingerprints to servers.xml, for testing and as example for the new format.
 - Force asynchronous (nonblocking) SSL handshake in all case
 - Add logging to c/connection.py

Known issues:
 - Checking of fingerprints doesn't work on in-band SSL (Typically port 5222) because of stuff happening out of sequence. Workaround: use immediate SSL mode ("Legacy SSL" option in server config). Because there is as of yet no other way to /force/ SSL, this is also the most secure setting.
 - A lot of code is still looking for a better place to live.
2006-12-22 23:30:23 +00:00
junglecow 35ecad1188 - Switch back to TLSv1 method
- Remove debug prints in stdlib ssl compatibility code
2006-12-21 18:08:17 +00:00
junglecow 62350adb36 - PyOpenSSL branch merged to trunk
Welcome to the world of PyOpenSSL! Please install PyOpenSSL, thanks!

svn merge -r 7426:HEAD svn://svn.gajim.org/gajim/branches/pyopenssl
2006-12-20 21:52:40 +00:00
junglecow fddb000a89 [Trunk]
- In verbose mode, print encodings. (Especially for Windows users who don't have Python) (gajim.py)
 - Attempt at fixing traceback when getting user's home directory in Windows. See #2812. (c/configpaths.py)
 - Show 'error' icon next to account while waiting for reconnect. Fixes #2786. (c/connection_handlers.py, c/gajim.py, c/connection.py)
[PyOpenSSL]
 - Fix 100% CPU usage and hanging connection when server closes connection on us. (c/x/transports_nb.py)
 - Fix 'hanging' connection when server closes the connection on us before we can open the XML stream. (Disconnect handler didn't get called.) (c/x/client_nb.py)
 - Change prints to logger calls, various enhancements to debug printing, reduce spam (c/x/transports_nb.py)
 - this → self (c/x/transports_nb.py)
 - Call _do_receive() once to collect error message from socket, when error flag is raised in scheduler. (c/x/transports_nb.py)
2006-12-20 20:40:08 +00:00
junglecow 8c78a14c3c - In [7647], reading of PID file was moved out of try..except block. Fixed.
- [PyOpenSSL] Small fix to error handling.
2006-12-15 10:57:25 +00:00
junglecow c09e6e0b93 [PyOpenSSL]
- Improved data extraction from exceptions
 - Clearer error messages
 - Reduced exception spam
2006-12-13 20:15:22 +00:00
junglecow 7c0696093a - Trying to connect to server every 20 seconds forever is extremely rude to its owner. Let's be polite and do exponential back-off. (See #2411)
- [PyOpenSSL] Ported [7443] to pyopenssl branch.
2006-12-08 21:19:01 +00:00
junglecow 4a58bc4797 [pyopenssl] Yet more exception fixes 2006-12-01 22:23:45 +00:00
junglecow 236ed0463a [pyopenssl] More exception fixes 2006-11-28 22:12:03 +00:00
junglecow 5cb241b8c0 [trunk]
- Typo
[pyopenssl]
- Better exception handling
- Prevent 100% cpu usage when ssl handshake is slow
2006-11-28 01:02:31 +00:00
Yann Leboulanger a37b946098 [sgala] IPV6 support for connection fith server. see #1969 2006-11-25 11:50:31 +00:00
Yann Leboulanger 7cdb177558 show error message when we try to register to an unavailable transport. fixes #1574 2006-11-22 19:49:41 +00:00
Jean-Marie Traissard 6775c3a43d Some errors spoted by file source checkers 2006-11-20 19:11:31 +00:00
Tomasz Melcer b9f5755ad6 Use iterators, better for memory usage. 2006-11-20 16:51:35 +00:00
Yann Leboulanger 2ebf1309de fix logic for #2680 2006-11-19 23:58:14 +00:00
Yann Leboulanger 483ccdf35a use isinstance instead of type. fixes #2680 2006-11-19 23:55:06 +00:00
Tomasz Melcer d9d5f5a841 Fixed last fix. 2006-11-18 21:04:24 +00:00
Tomasz Melcer 4b97eddee4 Comparing types: type(x)==type(self) => isinstance(x, self.__class__) 2006-11-18 21:01:41 +00:00
Tomasz Melcer 175a792cfe Merging changes from trunk (6774:7465) 2006-11-18 20:52:28 +00:00
Tomasz Melcer 68703a1d5d 'Server' part switched to use new forms. 2006-11-18 18:39:02 +00:00
junglecow 3c77ffd406 [PyOpenSSL branch]
- Close connection after creating account. Fixes #2676
- Handle normal connection close by server. Fixes #2671
- Do not disconnect if we haven't received starttag yet. Fixes #2668. Fixes unticketed bug causing account creation not to work with PyOpenSSL and asynchronous handshake (see also #2671). Behaviour of #2634 is also improved but now results in deadlock.
2006-11-18 15:09:40 +00:00
junglecow 321020751d Bugfix 2006-11-14 06:39:08 +00:00
junglecow be1b58aa79 Handle OpenSSL.SSL.SysCallError 2006-11-13 22:17:16 +00:00
junglecow 4617618463 Removing all calls to sys.exc_clear(). This is only necessary in very rare circumstances, and if there is such a circumstance, it should be clearly documented in code. 2006-11-13 15:07:47 +00:00
junglecow 9e3e14dd78 Fixed a bug in compatibility code 2006-11-13 14:44:17 +00:00
junglecow c5ffc7bf5d - Added support for PyOpenSSL (with fallback to old library if not found)
- Also added a wrapper for cleaner compatibility handling of old SSL library
- Changed exception handling to be more precise. (Catching Exception. Ish.)
- Added lots of debug printing

You will need to install pyopenssl (Debian unstable: python-pyopenssl) to try this.
2006-11-13 14:24:41 +00:00
Stefan Bethge 27849fc3d7 fix #2586, cleanup 2006-11-10 20:43:23 +00:00
Stefan Bethge bf69759900 fix #2649 2006-11-06 22:47:25 +00:00
Stefan Bethge 745434fdab give error messages when local message could not be sent, see #2586 2006-11-06 21:30:39 +00:00
Tomasz Melcer 289928050c Reworked dataforms, not finished yet. 2006-11-06 12:23:39 +00:00
Dimitur Kirov 59b6ae468a merge from trunk
automake based instalation
2006-10-04 00:10:49 +00:00
Dimitur Kirov 5fc8cf20f3 merge from trunk 2006-09-26 15:57:47 +00:00
Dimitur Kirov 57779a6ad3 drop connection after certain time of
inactivity
set timout on connect attempts
transleted russian comment
2006-09-20 11:01:47 +00:00
Dimitur Kirov da309569e3 add possibility to overide StremInit by _owner 2006-09-19 15:14:53 +00:00
Dimitur Kirov e9a855007b better xmmpppy plugin integration.
fixed xml error with iChats
2006-09-19 12:46:09 +00:00
Dimitur Kirov 1a325833c3 add listening server for incomming messages 2006-09-17 22:57:41 +00:00
Stefan Bethge 2b3120244f merged trunk r6780
removed i18n imports from zeroconf/connection files
2006-09-14 16:48:03 +00:00
Tomasz Melcer 9b29c4c8b8 Merging changes from trunk (6561:6774) 2006-09-13 16:47:58 +00:00
Tomasz Melcer 585ab90e92 Merging changes from trunk (6496:6561) 2006-07-17 19:30:53 +00:00
Tomasz Melcer c75bdcb63c Ad-Hoc commands window now uses new dataform wrapper. /me dances 2006-07-07 15:49:44 +00:00
Yann Leboulanger 59c3b7b3c8 JEP 172 support (user nickname) Fixes #464 and #884 2006-06-01 15:23:38 +00:00
Dimitur Kirov f9e874a1a3 make sure NBClientCommon, dispatcher and
NodeBuilder are callected when we close the
connection
2006-05-03 16:12:10 +00:00
Dimitur Kirov 9c37887ea0 handle challenge response multiple qops: #1907 2006-04-30 17:33:10 +00:00
Dimitur Kirov 9768940b3a show connect failure dialog when Unhandled data
is received (wrong protocol)
2006-04-15 09:43:15 +00:00
Dimitur Kirov 2fa30b7e1e use realm from first challenge response 2006-04-08 15:58:50 +00:00
Dimitur Kirov 6556d01cbe change(s) from xmpppy 2006-04-08 15:39:37 +00:00
Dimitur Kirov 71314f2b08 don't try to reconnect if socket was never
connected
2006-04-08 00:30:33 +00:00
Dimitur Kirov 114264ca13 stop if Process has return 0, meaning that it
closed the connection
2006-03-29 23:33:17 +00:00
Dimitur Kirov a9622c9a09 EISCONN shows that connection is already
established
2006-03-27 15:19:17 +00:00
Yann Leboulanger ff7eb2356a handle correctly when server return answer to register request when we create a new account. Fixes #1725 2006-03-27 09:53:47 +00:00
Yann Leboulanger bdda6d1555 show correct error message when we fail to create an account. See #1725 2006-03-26 23:42:36 +00:00
Dimitur Kirov b3de43ae3f disconnect after stream end tag, unregister
two more handlers
2006-03-16 17:29:30 +00:00
Dimitur Kirov d316c6d8b4 reconnect (if configured), instead of
disconnect on expat error
2006-03-15 20:46:50 +00:00
Dimitur Kirov 7afb58426a property last_connection, used to prevend
double connections
2006-03-15 20:10:52 +00:00
Dimitur Kirov 032ed4f22c typo 2006-03-15 19:47:11 +00:00
Dimitur Kirov 5e19b20377 return unregister attemped on undefined
namespace handlers
2006-03-15 19:43:22 +00:00
Dimitur Kirov c8b27da04f don't disconnect after server inabillity to
receive long data. Unregister all handlers in
disconnect
2006-03-15 19:39:27 +00:00
Yann Leboulanger 4cbc0666ff show an error dialog when a transport answers wrongly to register request. Fixes #1702 2006-03-15 08:56:36 +00:00
Dimitur Kirov 59283050e1 close connection when invalid xml is received
call sys.exc_clear in catched exceptions
2006-03-10 20:36:15 +00:00
Dimitur Kirov bc7d9a2943 clean last exception to prevent printing TB
( #1629 )
2006-03-07 11:54:45 +00:00
Yann Leboulanger d3417371c0 clear _expected dict when callback is called. This way when another stanza arrives with the same id, it isn't catched as expected. 2006-03-05 20:30:38 +00:00
Nikos Kouremenos 0349c4ad23 fix typo 2006-03-05 19:43:41 +00:00
Yann Leboulanger d54915c62a base64.encodestring() adds some \n in the string. Remove it 2006-03-05 19:39:07 +00:00
Dimitur Kirov 810a377156 added TODO, ensure we close all descriptors 2006-02-27 16:26:00 +00:00
Dimitur Kirov acdb712838 remove FORM FEED and ESC from sent data 2006-02-22 13:09:33 +00:00
Nikos Kouremenos 105616cfc3 sasl not support msg using debug. Dimitur, maybe it is time to remove blocking versions from svn? 2006-02-19 20:50:59 +00:00
Dimitur Kirov e748ad7990 make sure data tuple is deleted 2006-02-18 10:16:34 +00:00
Dimitur Kirov 32bfde61e2 faster CharacterDataHandler in NodeBuilder 2006-02-18 02:08:49 +00:00
Dimitur Kirov eacf5fb900 revert to self.DEBUG when SASL is not supported 2006-02-18 00:01:39 +00:00
Dimitur Kirov 6b615a8d72 delete debug error message, which causes TB
to be printed
2006-02-14 18:13:20 +00:00
Dimitur Kirov f84e410e5b plug_idle can have readable and writable False
in this case we wait only for close events
2006-02-12 02:23:20 +00:00
Dimitur Kirov 7576bb4f3e shutdown the reading and writing side of the
socket and close it, when we disconnect
2006-02-12 02:21:18 +00:00
Dimitur Kirov 81873919c5 remove error debug statement,use stderr instead
isinstance, instead of __class__.__name__
2006-02-11 21:49:17 +00:00
Dimitur Kirov 19ee5917bf try to reconnect when socket error
is raised during data receiving
2006-02-11 21:30:04 +00:00
Dimitur Kirov 79d39ac119 remove fd from selector and timeouts
when pollend event is raised
2006-02-11 21:27:44 +00:00
Dimitur Kirov d6fee1ea49 added missing argument to NBCommonClient call 2006-02-06 11:28:05 +00:00
Dimitur Kirov c3ef6cfbbc I'm losing the logic of this condition, but
this is a copy of the original, so it should
work
2006-02-06 10:00:23 +00:00
Dimitur Kirov f52144c803 socks5 classes now use Gajim idlequeue
still there are several TODOs
2006-02-06 00:11:45 +00:00
Dimitur Kirov ec1d354c80 use old select.select for polling on win-gtk2.8
untill there is a stable 2.8 version
2006-02-03 22:54:05 +00:00
Dimitur Kirov f62db4acfe Switched to non-blocking connections.
Removed threads and mutexes in connection.py
and gajim.py.
Add resolver through nslookup command, removed
dnspython and pydns (for now).
2006-02-03 12:17:34 +00:00
Norman Rasmussen f0adbc9892 fixed line endings 2006-01-20 13:23:38 +00:00
Nikos Kouremenos 1c5eab53d3 [knuckles] GMail notifications now always work and are enabled on gajim startup 2006-01-18 22:54:07 +00:00
Norman Rasmussen d5842b8e81 fixed import 2006-01-18 21:03:29 +00:00
Norman Rasmussen 65f67a7a04 upstream updates 2006-01-18 20:46:29 +00:00
Travis Shirk f52afdcbe8 Merged revisions 5017-5020,5022-5029 via svnmerge from
svn://svn.gajim.org/gajim/trunk

........
r5017 | asterix | 2006-01-06 01:55:51 -0700 (Fri, 06 Jan 2006) | 2 lines

use escape for pango markup

........
r5018 | asterix | 2006-01-06 02:21:39 -0700 (Fri, 06 Jan 2006) | 2 lines

missing new contacts function

........
r5019 | asterix | 2006-01-06 11:03:07 -0700 (Fri, 06 Jan 2006) | 2 lines

handle the click on toggle_gpg_encryption menuitem

........
r5020 | asterix | 2006-01-06 11:14:14 -0700 (Fri, 06 Jan 2006) | 2 lines

use the saved size even if a chat window is already opened

........
r5022 | asterix | 2006-01-07 03:43:47 -0700 (Sat, 07 Jan 2006) | 2 lines

we can now resume filetransfert

........
r5023 | asterix | 2006-01-07 03:56:31 -0700 (Sat, 07 Jan 2006) | 2 lines

[Knuckles] Google E-Mail Notification

........
r5024 | asterix | 2006-01-07 04:02:16 -0700 (Sat, 07 Jan 2006) | 2 lines

better string

........
r5025 | asterix | 2006-01-07 04:14:32 -0700 (Sat, 07 Jan 2006) | 2 lines

fix a TB

........
r5026 | asterix | 2006-01-07 05:36:55 -0700 (Sat, 07 Jan 2006) | 2 lines

we can now drag a file on a contact in the roster to send him a file

........
r5027 | asterix | 2006-01-07 06:26:28 -0700 (Sat, 07 Jan 2006) | 2 lines

contact.groups is always a list, even if emtpy

........
r5028 | asterix | 2006-01-07 06:54:30 -0700 (Sat, 07 Jan 2006) | 2 lines

make all buttons insensitive on a category row in disco

........
r5029 | asterix | 2006-01-07 07:19:25 -0700 (Sat, 07 Jan 2006) | 2 lines

auto open groupchat configuration window when we create a new room

........
2006-01-07 17:25:35 +00:00
Nikos Kouremenos 0584c4bff1 almost impossible to fail 2005-12-26 18:38:05 +00:00
Nikos Kouremenos 250e916318 check so we cannot fail 2005-12-26 13:36:55 +00:00
Nikos Kouremenos 6a1db9ea0f should work now. wed plz test 2005-12-26 13:28:13 +00:00
Nikos Kouremenos 8a875bdb2c do some crazy stuff on exception msg when exception object does not have errno attribute 2005-12-26 01:05:36 +00:00
Nikos Kouremenos 9385f1074f [greblus] preferences window now can control the color of URLs 2005-12-25 23:48:08 +00:00