Matthew Wild
86341e87d3
util.sasl: Preserve 'userdata' field between clones
...
The :clean_clone() method is designed to provide a new cloned SASL handler,
to be used when starting a fresh SASL negotiation on an existing connection.
The userdata field is currently populated by mod_saslauth with the "read-only"
information that the channel binding methods need to do their stuff.
When :clean_clone() does not preserve this, it causes tracebacks in the cb
profile handlers due to the property being nil.
This does mean that SASL handlers should now not be reused (even when cloned)
across different connections, if they ever could.
2025-03-06 13:34:37 +00:00
Kim Alvefur
323408cfc9
util.sasl: Fix a singulars
...
Thanks timeless, your mere existence inspires us to improve our
spelling, tho this was more syntax.
2023-04-07 17:18:23 +02:00
Kim Alvefur
43531740f9
util: Prefix module imports with prosody namespace
2023-03-17 16:23:16 +01:00
Matthew Wild
6db4afa0c3
util.sasl: Add SASL OAUTHBEARER mechanism (RFC 7628)
2023-03-01 12:55:00 +00:00
Kim Alvefur
43351d2b54
Spelling: Fix various spelling mistakes (thanks timeless)
...
Words, sometimes I wonder how they even work
Maybe I missed something.
2022-03-07 00:13:56 +01:00
Kim Alvefur
c506269ff5
Fix various spelling errors (thanks codespell)
...
Also special thanks to timeless, for wordlessly reminding me to check
for typos.
2021-07-27 00:13:18 +02:00
Kim Alvefur
44ed7a0e21
util.sasl.digest-md5: Remove, obsolete since 2011
...
RFC 6331 lists several problems with this outdated authentication
mechanism. The code here was also completely ignored by lint checks and
has probably not been used for a long time, as it is incompatible with
SCRAM-hashed password storage.
2020-04-14 16:51:24 +02:00
Kim Alvefur
43b814a83b
vairious: Add annotation when an empty environment is set [luacheck]
2018-02-28 20:06:26 +01:00
Kim Alvefur
1438a38845
util: Various minor changes to please [luacheck]
2017-11-10 05:42:32 +01:00
Kim Alvefur
eaa823a597
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
2015-02-21 10:36:37 +01:00
Kim Alvefur
add9033b9b
util.sasl: Fix logic for when mechanisms with channel binding support are offered
2014-03-22 14:45:04 +01:00
Waqas Hussain
78247fb898
util.sasl: Remove unused print() import.
2013-10-07 18:02:58 -04:00
Waqas Hussain
ed452e4e84
util.sasl: Make registerMechanism a public function (again)
2013-10-07 17:57:06 -04:00
Kim Alvefur
3d137b760e
Merge Tobias SCRAM-PLUS work
2013-09-22 00:44:20 +02:00
Kim Alvefur
e5a50872bb
util.sasl.external: Add SASL EXTERNAL mechanism
2013-06-13 18:20:49 +02:00
Matthew Wild
9d379a1dae
util.sasl: Make registerMechanism a public function
2012-06-18 16:57:46 +01:00
Tobias Markmann
0a2715f365
Only advertise mechanisms needing channel binding if a channel binding backend is avaliable.
2011-02-07 13:24:42 +01:00
Tobias Markmann
0435f611fd
util.sasl: New method to add channel binding handler to a SASL instance.
2011-01-17 16:50:21 +01:00
Tobias Markmann
1e72875d52
Check whether we support the proposed channel binding type.
2011-01-15 17:59:15 +01:00
Waqas Hussain
027cb33f09
util.sasl: Cache the calculated mechanisms set for SASL profiles (profile.mechanisms table).
2010-12-29 18:45:31 +05:00
Waqas Hussain
372813b78e
util.sasl, util.sasl_cyrus: Mechanism selection cleaned up to be more consistent.
2010-11-02 18:58:11 +05:00
Waqas Hussain
310785e05e
util.sasl, util.sasl_cyrus: Load mechanisms list early rather than lazily, as they are always loaded anyway.
2010-11-02 18:04:56 +05:00
Waqas Hussain
2e77194fff
util.sasl: Simplified some code a bit.
2010-08-03 18:19:45 +05:00
Waqas Hussain
90c9e3ccc8
util.sasl, util.sasl_cyrus: Removed a ton of unused variables.
2010-08-03 17:11:40 +05:00
Waqas Hussain
f502e55ef5
util.sasl: Removed method:forbidden() and its side effects.
2010-08-02 18:47:33 +05:00
Waqas Hussain
dbaf695730
util.sasl, util.sasl_cyrus: s/self.mechanisms()/self:mechanisms()/ in method:select().
2010-07-15 22:07:45 +05:00
Waqas Hussain
74f1fca10e
util.sasl, util.sasl_cyrus: Use method:mechanisms() in method:select(), instead of using the mechanisms list directly (fixes a traceback).
2010-07-14 20:21:51 +05:00
Waqas Hussain
81c3a58d1f
util.sasl, util.sasl_cyrus: Updated method:mechanisms() to cache and re-use list of mechanisms.
2010-07-14 20:10:35 +05:00
Waqas Hussain
d9319436f0
util.sasl: Use the proper session-specific table of mechanisms when selecting a mechanism, and not the global table.
2010-07-14 20:05:25 +05:00
Waqas Hussain
fa595a9dd3
SASL: Simplified sasl_handler:mechanisms() to return a set, and not an array.
2010-07-14 19:56:57 +05:00
Waqas Hussain
14b609e6ee
SASL: Minor cleanup.
2010-06-03 17:48:50 +05:00
Tobias Markmann
b05ccd7b3a
Merge with tip.
2010-03-12 18:41:05 +01:00
Tobias Markmann
3a972b1742
util.sasl: 2009 -> 2010 in copyright header.
2010-03-12 18:37:51 +01:00
Waqas Hussain
29e84d0af1
util.sasl: Fixed a nil global access.
2010-03-02 00:51:27 +05:00
Tobias Markmann
cb3a0cad21
util.sasl: Moving SASL authentication backends documentation to the mechanism files.
2010-02-28 22:32:12 +01:00
Tobias Markmann
d3bf83037f
util.sasl: Move some variables to local space. Fix a bug.
2009-11-28 18:23:25 +01:00
Tobias Markmann
44b3480e14
util.sasl: Adding clean_clone() method.
2009-11-26 23:11:02 +01:00
Tobias Markmann
406173262f
Cleaning up.
2009-11-18 23:25:27 +01:00
Tobias Markmann
517d02616e
Tidying up.
2009-11-18 22:59:43 +01:00
Tobias Markmann
2519d3119c
Enable restriction of supported mechanisms in the SASL library.
2009-11-18 22:56:50 +01:00
Tobias Markmann
b0f89bf885
Making interop with libpurple. (Thanks darkrain).
2009-11-17 22:39:18 +01:00
Tobias Markmann
907c9a7435
Merge with sasl branch.
2009-11-16 21:43:57 +01:00
Tobias Markmann
8c36b99f27
Adding support for digest-md5 profile in DIGEST-MD5 implementation.
2009-11-13 11:24:22 +01:00
Tobias Markmann
8e7427e70d
Change of the digest-md5 profile.
2009-11-13 11:21:21 +01:00
Tobias Markmann
ed841d20a7
Add support for plain profile in digest-md5 implementation.
2009-11-13 10:54:17 +01:00
Tobias Markmann
72e185fa03
Getting PLAIN mechanism work with the new API.
2009-11-13 09:21:19 +01:00
Waqas Hussain
8fc8a263c6
util.sasl: Improved a log message.
2009-11-13 06:29:37 +05:00
Waqas Hussain
d8063b7436
util.sasl: Allow authzid=username (for compatibility with Smack's non-compliant behavior).
2009-11-13 06:10:46 +05:00
Waqas Hussain
715a48d5c3
util.sasl: Return proper error when client provides authzid.
2009-11-13 04:24:17 +05:00
Tobias Markmann
5554c33417
Move each mechanism in an own file.
2009-11-12 21:57:37 +01:00