Robin Gloster
afc939708f
cleanup semicolons, whitespace and mutable default arguments
2014-08-23 12:47:29 +02:00
Robin Gloster
3dd379cdf1
Revert "cleanup semicolons, whitespace and mutable default arguments"
...
This reverts commit 7265682a4d
.
2014-08-18 15:15:14 +02:00
Robin Gloster
7265682a4d
cleanup semicolons, whitespace and mutable default arguments
2014-08-18 00:52:24 +02:00
Graham
a918bf3a95
Support jabberd2 SASL with really empty response
...
Despite http://xmpp.org/rfcs/rfc3920.html#rfc.section.6.2 , jabberd version 2.2.14 cannot accept the typical "<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">=</response>". Instead it must be truly empty, so we force an empty response for this stanza only.
2014-05-14 22:32:51 +01:00
Lance Stout
6f64dac262
Add log message noting that SCRAM-SHA-1-PLUS requires Py3.3+
2013-09-21 19:10:12 -07:00
Jean-Philippe Caruana
2c26fb0d76
optimize imports
2013-07-26 17:48:33 +02:00
Anton Ryzhov
481971928c
failed_auth
data returned
...
Manual updated
2013-03-28 22:41:00 +04:00
Anton Ryzhov
a0c77c04a5
XMLStream proxy_error
event duplicated with connection_failed
...
SASL `no_auth` event duplicated with `failed_auth`
2013-03-28 22:09:33 +04:00
Anton Ryzhov
620ee9719f
Changed failed_auth
event according to manual
2013-03-28 22:09:33 +04:00
Lance Stout
1f137735e1
Put StringPrep exception handler with the right try block.
2013-01-24 02:45:28 -08:00
Lance Stout
def34f0e42
Fix requesting channel binding from sockets that don't support it.
2012-12-03 12:42:30 -08:00
Lance Stout
b820351f64
Fix DIGEST-MD5 support for picky servers
2012-11-27 19:54:46 -05:00
Lance Stout
0eb009496e
Use the username credential instead of jid to enable ANONYMOUS auth.
2012-11-27 19:53:43 -05:00
Lance Stout
2c2498b658
Allow for more credential values to be user specified instead of auto-filled.
2012-11-27 19:53:04 -05:00
Lance Stout
657102e938
Update legacy auth to be used outside of stream features.
...
Also, add detection of legacy XMPP version.
2012-10-01 16:27:55 -07:00
Lance Stout
8a03bd72ae
Ensure that auth is done based on the original, requested JID and not on the bound JID.
2012-08-17 10:17:35 -07:00
Lance Stout
f0e1fc5aad
Fix using PLAIN over older SSL method.
2012-08-14 11:06:36 -07:00
Lance Stout
4e12e228cb
Fix tracking service name for DIGEST-MD5
2012-08-10 12:40:28 -07:00
Lance Stout
2324c90232
Ensure default authzids are handled.
2012-08-02 13:47:06 -07:00
Lance Stout
475ccfa8dc
Use correct method for getting channel binding.
2012-08-01 09:04:58 -07:00
Lance Stout
695cd95657
Update and integrate Suelta.
2012-07-30 19:15:10 -07:00
Lance Stout
a06fa2de67
Enhance plugin config with attribute accessors.
...
This makes updating the config after plugin initialization much easier.
2012-07-26 23:04:16 -07:00
Lance Stout
7858d969d8
Remove usage of deprecated getchildren() method.
2012-06-19 09:47:31 -07:00
Lance Stout
d92aa05b5c
PEP8 formatting updates.
2012-06-19 01:29:48 -07:00
Lance Stout
7842c55da3
Add auth_success event.
...
The auth_success event is triggered upon successful SASL negotiation.
2012-05-15 14:26:25 -07:00
Lance Stout
f5beac2afa
Use SASLPrepFailure as the exception name instead of UnicodeError.
2012-05-14 23:12:54 -07:00
Lance Stout
8a23f28dfa
Add an exception handler for SASLprep failures.
2012-05-14 22:26:06 -07:00
Lance Stout
4b2b2d16b8
Reset attempted SASL mech set after no suitable mechs are found.
2012-04-11 12:53:22 -04:00
Lance Stout
96ff2d43c0
Explicitly set the desired SASL mech to ANONYMOUS if no username is provided.
2012-03-13 12:24:41 -07:00
Lance Stout
1b00b7e8df
Correct handling SASL auth failures when forcing the use of a specific mechanism.
2012-03-13 11:07:14 -07:00
Lance Stout
9596616b42
Move feature_mechanisms to new system.
2012-03-12 19:52:01 -07:00
Lance Stout
7d74a7b027
More extraneous import cleanup.
2012-02-17 14:59:56 -08:00
Lance Stout
c1357717d9
Use '=' as base64 value for empty string SASL results.
2012-02-09 22:01:11 -08:00
Lance Stout
f81fb6af44
Require explicitly setting access_token value.
...
Silently substituting the password field was nice, but for mechs
that can use either the password or an access token, it makes
things very difficult. This really only affects MSN clients since
Facebook clients should already be setting the api key.
2012-01-21 00:19:59 -08:00
Lance Stout
bb0a5186d6
Handle SASLCancelled and SASLError exceptions.
2012-01-21 00:19:08 -08:00
Lance Stout
baad907422
Add missing SASL <abort /> stanza
2012-01-21 00:17:49 -08:00
Lance Stout
3a22d798f8
Allow attempting multiple SASL mechs during a single stream.
...
Instead of disconnecting when the first chosen mech fails, we will
try all of them once.
2012-01-20 02:01:08 -08:00
Lance Stout
0d2125e737
Add an extra config dict to store SASL credentials.
...
We'll need extra things beyond just a password, such as api_key.
2012-01-20 01:08:25 -08:00
Lance Stout
1e01903072
Revert "Remove stream feature handlers on session_start."
...
This reverts commit 4274f49ada
.
The SASL mech was choking on this, so let's send it back for some
more refining.
2012-01-18 11:51:00 -08:00
Lance Stout
4274f49ada
Remove stream feature handlers on session_start.
...
Based on profiling, using around 35 stream handlers quarters the number
of basic message stanzas that can be processed in a second, in
comparison to only using the bare minimum of four handlers.
To help, we can drop handlers for stream features once the session
has started. So that we can re-enable these handlers when a stream
must restart, the 'stream_start' event has been added which fires
whenever a stream header is received.
The 'stream_start' event is a more generic replacement for the
existing start_stream_handler() method.
2012-01-17 22:14:24 -08:00
Lance Stout
6b9a55e62d
Sync with Suelta.
2012-01-07 00:19:08 -05:00
Lance Stout
c578ddeb1a
Add support for MSN with X-MESSENGER-OAUTH2 SASL support.
...
NOTE: This requires already having the access token. It does NOT
perform any OAuth requests.
2012-01-06 23:31:58 -05:00
Lance Stout
429c94d6a9
Tidy up logging calls.
2011-11-19 12:07:57 -08:00
Vijay Pandurangan
deb52ad350
This change stops sleekxmpp from spending huge amounts of time unnecessarily computing logging data that may never be used. This is a HUGE performance improvement; in some of my test runs, unnecessary string creation was accounting for > 60% of all CPU time.
...
Note that using % in a string will _always_ perform the sting substitutions, because the strings are constructed before the function is called. So log.debug('%s' % expensiveoperation()) will take about the same CPU time whether or not the logging level is DEBUG or INFO. if you use , no substitutions are performed unless the string is actually logged
2011-11-20 03:39:05 +08:00
Lance Stout
572becad44
Enable forcing a specififc SASL mech:
...
xmpp = ClientXMPP(jid, password, {
'feature_mechanisms': {'use_mech':'PLAIN'}})
2011-08-09 00:51:49 -07:00
Lance Stout
47bc50d9fb
Cosmetic PEP8 fixes.
2011-08-04 22:37:22 -07:00
Lance Stout
d4091dbde6
Integrate a modified version of Dave Cridland's Suelta SASL library.
2011-08-03 17:00:51 -07:00
Lance Stout
0224d028e7
SASL failure event now includes the failure stanza.
...
Broke SASL stanzas into separate files.
Fixed typo in feature_bind.
2011-07-02 23:09:29 -07:00
Lance Stout
219df582da
It isn't 2010 anymore.
...
I keep forgetting to update the copyright on new code.
2011-07-02 22:49:34 -07:00
Lance Stout
b898b14b77
Use a set to track negotiated features.
...
Added guards to prevent renegotiating STARTTLS or SASL in cases where
servers don't behave properly.
2011-07-02 22:30:55 -07:00