prosody.git
14 years agomod_tls: Don't offer TLS on hosts that don't have any certs
Matthew Wild [Fri, 12 Feb 2010 21:33:22 +0000 (21:33 +0000)]
mod_tls: Don't offer TLS on hosts that don't have any certs

14 years agosessionmanager, s2smanager: Fix for syntax of null_data_handler() (thanks Nolan)
Matthew Wild [Fri, 12 Feb 2010 17:27:53 +0000 (17:27 +0000)]
sessionmanager, s2smanager: Fix for syntax of null_data_handler() (thanks Nolan)

14 years agosessionmanager, s2smanager: Give sessions dummy data handlers that log when data...
Matthew Wild [Fri, 12 Feb 2010 17:14:54 +0000 (17:14 +0000)]
sessionmanager, s2smanager: Give sessions dummy data handlers that log when data is received by a destroyed session

14 years agonet.dns: Normalize records before placing them in the cache, fixes issues with CNAME...
Matthew Wild [Fri, 12 Feb 2010 15:05:48 +0000 (15:05 +0000)]
net.dns: Normalize records before placing them in the cache, fixes issues with CNAME targets in CAPS (fixes #161)

14 years agonet.dns: Update for new socket API
Matthew Wild [Fri, 12 Feb 2010 15:02:57 +0000 (15:02 +0000)]
net.dns: Update for new socket API

14 years agohostmanager: Small optimisation in checking whether a host is enabled
Matthew Wild [Fri, 12 Feb 2010 12:47:23 +0000 (12:47 +0000)]
hostmanager: Small optimisation in checking whether a host is enabled

14 years agohostmanager: Log an error if no hosts are defined
Matthew Wild [Fri, 12 Feb 2010 12:43:50 +0000 (12:43 +0000)]
hostmanager: Log an error if no hosts are defined

14 years agomod_privacy: Remove the non-working sendNeededUnavailablePresences() and the related...
Matthew Wild [Fri, 12 Feb 2010 12:29:53 +0000 (12:29 +0000)]
mod_privacy: Remove the non-working sendNeededUnavailablePresences() and the related commented code

14 years agomod_privacy: Fix to correctly iterate over lists stored in new format
Matthew Wild [Fri, 12 Feb 2010 12:28:45 +0000 (12:28 +0000)]
mod_privacy: Fix to correctly iterate over lists stored in new format

14 years agomod_privacy: Upgrade old privacy lists to new storage format, so they don't get lost
Matthew Wild [Fri, 12 Feb 2010 12:07:46 +0000 (12:07 +0000)]
mod_privacy: Upgrade old privacy lists to new storage format, so they don't get lost

14 years agos2smanager, mod_compression, mod_tls: Changed event.session to event.origin for s2s...
Waqas Hussain [Thu, 11 Feb 2010 23:30:17 +0000 (04:30 +0500)]
s2smanager, mod_compression, mod_tls: Changed event.session to event.origin for s2s-stream-features event for consistency.

14 years agomod_saslauth: Hook stream-features event using new events API.
Waqas Hussain [Thu, 11 Feb 2010 23:25:37 +0000 (04:25 +0500)]
mod_saslauth: Hook stream-features event using new events API.

14 years agomod_roster: Hook stream-features event using new events API.
Waqas Hussain [Thu, 11 Feb 2010 23:22:30 +0000 (04:22 +0500)]
mod_roster: Hook stream-features event using new events API.

14 years agomod_legacyauth: Hook stream-features event using new events API.
Waqas Hussain [Thu, 11 Feb 2010 23:22:01 +0000 (04:22 +0500)]
mod_legacyauth: Hook stream-features event using new events API.

14 years agomod_compression: Hook stream-features event using new events API.
Waqas Hussain [Thu, 11 Feb 2010 23:21:34 +0000 (04:21 +0500)]
mod_compression: Hook stream-features event using new events API.

14 years agomod_bosh: Fire stream-features event using new events API.
Waqas Hussain [Thu, 11 Feb 2010 23:11:50 +0000 (04:11 +0500)]
mod_bosh: Fire stream-features event using new events API.

14 years agomod_tls: Hook stream-features event using new events API.
Waqas Hussain [Thu, 11 Feb 2010 22:50:44 +0000 (03:50 +0500)]
mod_tls: Hook stream-features event using new events API.

14 years agosessionmanager: Fire stream-features event using new events API.
Waqas Hussain [Thu, 11 Feb 2010 22:49:05 +0000 (03:49 +0500)]
sessionmanager: Fire stream-features event using new events API.

14 years agomod_tls: Cleanup.
Waqas Hussain [Thu, 11 Feb 2010 22:46:48 +0000 (03:46 +0500)]
mod_tls: Cleanup.

14 years agomod_tls: Fixed an extra :up() in s2s stream feature generation.
Waqas Hussain [Thu, 11 Feb 2010 22:14:53 +0000 (03:14 +0500)]
mod_tls: Fixed an extra :up() in s2s stream feature generation.

14 years agoMerge with trunk.
Waqas Hussain [Thu, 11 Feb 2010 21:50:57 +0000 (02:50 +0500)]
Merge with trunk.

14 years agomod_tls: Remove origin type check when TLS is requested (thanks MattJ).
Waqas Hussain [Thu, 11 Feb 2010 21:43:02 +0000 (02:43 +0500)]
mod_tls: Remove origin type check when TLS is requested (thanks MattJ).

14 years agomod_tls: Respond with proper error when TLS cannot be negotiated.
Waqas Hussain [Thu, 11 Feb 2010 21:39:50 +0000 (02:39 +0500)]
mod_tls: Respond with proper error when TLS cannot be negotiated.

14 years agonet.server_event: Fixes for traceback with no LuaSec
Matthew Wild [Thu, 11 Feb 2010 21:32:49 +0000 (21:32 +0000)]
net.server_event: Fixes for traceback with no LuaSec

14 years agomod_tls: Inlined some code.
Waqas Hussain [Thu, 11 Feb 2010 21:32:27 +0000 (02:32 +0500)]
mod_tls: Inlined some code.

14 years agomod_tls: Merged duplicate code.
Waqas Hussain [Thu, 11 Feb 2010 21:15:54 +0000 (02:15 +0500)]
mod_tls: Merged duplicate code.

14 years agonet.server_select: Small indentation fix
Matthew Wild [Thu, 11 Feb 2010 21:13:45 +0000 (21:13 +0000)]
net.server_select: Small indentation fix

14 years agonet.server_select: Fix traceback with no LuaSec available (thanks Nolan)
Matthew Wild [Thu, 11 Feb 2010 21:09:59 +0000 (21:09 +0000)]
net.server_select: Fix traceback with no LuaSec available (thanks Nolan)

14 years agomod_tls: Switched to new events API.
Waqas Hussain [Thu, 11 Feb 2010 20:56:18 +0000 (01:56 +0500)]
mod_tls: Switched to new events API.

14 years agomod_tls: Slight refactoring.
Waqas Hussain [Thu, 11 Feb 2010 20:47:10 +0000 (01:47 +0500)]
mod_tls: Slight refactoring.

14 years agomod_presence: Don't depend on user being online when calculating top resources.
Waqas Hussain [Thu, 11 Feb 2010 19:55:06 +0000 (00:55 +0500)]
mod_presence: Don't depend on user being online when calculating top resources.

14 years agomod_presence: Don't depend on sessions array existing for a user when handling outgoi...
Waqas Hussain [Thu, 11 Feb 2010 19:54:14 +0000 (00:54 +0500)]
mod_presence: Don't depend on sessions array existing for a user when handling outgoing presence broadcast.

14 years agosessionmanager: Fire resource-unbind event after removing session from sessions table
Matthew Wild [Thu, 11 Feb 2010 19:34:23 +0000 (19:34 +0000)]
sessionmanager: Fire resource-unbind event after removing session from sessions table

14 years agomod_privacy: Remove use of to identify unspecified privacy list
Matthew Wild [Thu, 11 Feb 2010 18:49:17 +0000 (18:49 +0000)]
mod_privacy: Remove use of  to identify unspecified privacy list

14 years agomod_privacy: Fix potential traceback in stanza validation, and fix some zero-based...
Matthew Wild [Thu, 11 Feb 2010 18:44:42 +0000 (18:44 +0000)]
mod_privacy: Fix potential traceback in stanza validation, and fix some zero-based indexing :)

14 years agomod_privacy: Don't store the privacy lists as an array, but as a map... faster and...
Matthew Wild [Thu, 11 Feb 2010 12:10:06 +0000 (12:10 +0000)]
mod_privacy: Don't store the privacy lists as an array, but as a map... faster and less code

14 years agoprosody, prosodyctl: Re-jiggle load order again, fixes logging config not being obeye...
Matthew Wild [Thu, 11 Feb 2010 11:31:14 +0000 (11:31 +0000)]
prosody, prosodyctl: Re-jiggle load order again, fixes logging config not being obeyed (thanks darkrain)

14 years agologgingmanager: Trailing whitespace
Matthew Wild [Thu, 11 Feb 2010 11:04:26 +0000 (11:04 +0000)]
loggingmanager: Trailing whitespace

14 years agomodulemanager: Load plugin libraries in the same environment as the plugins.
Waqas Hussain [Thu, 11 Feb 2010 00:36:03 +0000 (05:36 +0500)]
modulemanager: Load plugin libraries in the same environment as the plugins.

14 years agomodulemanager: Make the plugin environment available directly (module.environment...
Waqas Hussain [Thu, 11 Feb 2010 00:34:53 +0000 (05:34 +0500)]
modulemanager: Make the plugin environment available directly (module.environment within plugins).

14 years agoutil.datamanager: Added support for hooks to override behavior.
Waqas Hussain [Thu, 11 Feb 2010 00:21:03 +0000 (05:21 +0500)]
util.datamanager: Added support for hooks to override behavior.

14 years agonet.server_select: Only allow starttls if luasec is available (thanks Nolan)
Matthew Wild [Wed, 10 Feb 2010 19:17:45 +0000 (19:17 +0000)]
net.server_select: Only allow starttls if luasec is available (thanks Nolan)

14 years agonet.server_select: *Major* whitespace refactoring to meet Prosody's coding style...
Matthew Wild [Wed, 10 Feb 2010 19:12:43 +0000 (19:12 +0000)]
net.server_select: *Major* whitespace refactoring to meet Prosody's coding style guidelines, we now have tabs

14 years agosessionmanager: Whitespace fix
Matthew Wild [Wed, 10 Feb 2010 07:53:25 +0000 (07:53 +0000)]
sessionmanager: Whitespace fix

14 years agomod_privacy: Rename from_user/to_user flags to is_from_user/is_to_user for clarity
Matthew Wild [Tue, 9 Feb 2010 06:49:03 +0000 (06:49 +0000)]
mod_privacy: Rename from_user/to_user flags to is_from_user/is_to_user for clarity

14 years agonet.dns, net.adns: Changed dns:socket_wrapper_set to dns.socket_wrapper_set for consi...
Waqas Hussain [Tue, 9 Feb 2010 20:58:49 +0000 (01:58 +0500)]
net.dns, net.adns: Changed dns:socket_wrapper_set to dns.socket_wrapper_set for consistency.

14 years agoutil.sasl_cyrus: Add text message from cyrussasl to <not-authorized/> errors.
Waqas Hussain [Tue, 9 Feb 2010 20:53:38 +0000 (01:53 +0500)]
util.sasl_cyrus: Add text message from cyrussasl to <not-authorized/> errors.

14 years agomod_tls: Don't advertise TLS after authentication.
Waqas Hussain [Tue, 9 Feb 2010 20:36:22 +0000 (01:36 +0500)]
mod_tls: Don't advertise TLS after authentication.

14 years agonet.dns: Fixed whitespace/indentation.
Waqas Hussain [Tue, 9 Feb 2010 19:46:04 +0000 (00:46 +0500)]
net.dns: Fixed whitespace/indentation.

14 years agonet.dns: Removed unused function.
Waqas Hussain [Tue, 9 Feb 2010 19:38:07 +0000 (00:38 +0500)]
net.dns: Removed unused function.

14 years agonet.dns: Removed some useless indirection to improve readability.
Waqas Hussain [Tue, 9 Feb 2010 19:34:30 +0000 (00:34 +0500)]
net.dns: Removed some useless indirection to improve readability.

14 years agoutil.encodings: Use STD3 ASCII rules for idna.to_ascii.
Waqas Hussain [Tue, 9 Feb 2010 19:12:48 +0000 (00:12 +0500)]
util.encodings: Use STD3 ASCII rules for idna.to_ascii.

14 years agonet.httpserver: Make request.conn be the server.lua conn instead of the underlying...
Matthew Wild [Mon, 8 Feb 2010 11:22:21 +0000 (11:22 +0000)]
net.httpserver: Make request.conn be the server.lua conn instead of the underlying socket (more useful this way)

14 years agonet.httpserver: Trailing whitespace
Matthew Wild [Mon, 8 Feb 2010 11:20:19 +0000 (11:20 +0000)]
net.httpserver: Trailing whitespace

14 years agoMerge with backout
Matthew Wild [Fri, 5 Feb 2010 17:46:58 +0000 (17:46 +0000)]
Merge with backout

14 years agoutil.sasl.digest-md5: Revert changeset 6094a4e2b6f3 as it breaks some clients, re...
Matthew Wild [Fri, 5 Feb 2010 17:46:46 +0000 (17:46 +0000)]
util.sasl.digest-md5: Revert changeset 6094a4e2b6f3 as it breaks some clients, re-visit some time down the line

14 years agoprosody: Add a catch-all friendly message for when any port is in use we want to use
Matthew Wild [Fri, 5 Feb 2010 15:05:39 +0000 (15:05 +0000)]
prosody: Add a catch-all friendly message for when any port is in use we want to use

14 years agoprosodyctl: Initialize logging before checking dependencies
Ali Sabil [Fri, 5 Feb 2010 15:01:21 +0000 (16:01 +0100)]
prosodyctl: Initialize logging before checking dependencies

14 years agoprosody: Initialize logging before checking dependencies (fixes another traceback...
Matthew Wild [Fri, 5 Feb 2010 14:32:20 +0000 (14:32 +0000)]
prosody: Initialize logging before checking dependencies (fixes another traceback with no LuaSec)

14 years agocertmanager: Fix traceback with no LuaSec
Matthew Wild [Fri, 5 Feb 2010 14:31:25 +0000 (14:31 +0000)]
certmanager: Fix traceback with no LuaSec

14 years agocertmanager: Tabs not spaces!
Matthew Wild [Fri, 5 Feb 2010 14:22:48 +0000 (14:22 +0000)]
certmanager: Tabs not spaces!

14 years agoutil.dependencies: Don't query the config (it isn't really necessary)
Matthew Wild [Fri, 5 Feb 2010 13:52:01 +0000 (13:52 +0000)]
util.dependencies: Don't query the config (it isn't really necessary)

14 years agonet.server_event: Update for compatibility with new server API
Matthew Wild [Sun, 31 Jan 2010 19:58:52 +0000 (19:58 +0000)]
net.server_event: Update for compatibility with new server API

14 years agonet.xmppserver_listener: status -> onstatus for consistency
Matthew Wild [Sun, 31 Jan 2010 19:57:58 +0000 (19:57 +0000)]
net.xmppserver_listener: status -> onstatus for consistency

14 years agonet.server_select: listener.status -> listener.onstatus for consistency
Matthew Wild [Sun, 31 Jan 2010 19:56:22 +0000 (19:56 +0000)]
net.server_select: listener.status -> listener.onstatus for consistency

14 years agonet.adns: Use different flavour of voodoo to make UDP sockets work smoothly with...
Matthew Wild [Sun, 31 Jan 2010 19:54:56 +0000 (19:54 +0000)]
net.adns: Use different flavour of voodoo to make UDP sockets work smoothly with libevent (no packet merging)

14 years agoutil.stanza: stanza.error_reply(): Fix to put the correct namespace on <text>
Matthew Wild [Sun, 31 Jan 2010 19:27:52 +0000 (19:27 +0000)]
util.stanza: stanza.error_reply(): Fix to put the correct namespace on <text>

14 years agonet.adns: Trailing whitespace
Matthew Wild [Sun, 31 Jan 2010 18:09:37 +0000 (18:09 +0000)]
net.adns: Trailing whitespace

14 years agohostmanager: Use certmanager for obtaining SSL contexts
Matthew Wild [Sun, 31 Jan 2010 17:23:39 +0000 (17:23 +0000)]
hostmanager: Use certmanager for obtaining SSL contexts

14 years agocertmanager: Hello world, I'm come to manage your SSL contexts
Matthew Wild [Sun, 31 Jan 2010 17:22:59 +0000 (17:22 +0000)]
certmanager: Hello world, I'm come to manage your SSL contexts

14 years agoprosody: Show friendly error when no config present for legacy SSL ports
Matthew Wild [Sun, 31 Jan 2010 17:15:35 +0000 (17:15 +0000)]
prosody: Show friendly error when no config present for legacy SSL ports

14 years agoconfigmanager: Trailing whitespace
Matthew Wild [Sun, 31 Jan 2010 17:14:52 +0000 (17:14 +0000)]
configmanager: Trailing whitespace

14 years agonet.connlisteners: Return an error if no SSL context is supplied for a connection...
Matthew Wild [Sun, 31 Jan 2010 17:08:57 +0000 (17:08 +0000)]
net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl'

14 years agoprosody: Log error message when failing to open ports
Matthew Wild [Sun, 31 Jan 2010 16:40:47 +0000 (16:40 +0000)]
prosody: Log error message when failing to open ports

14 years agonet.server_select: Report whether a new listener uses SSL or not in the log message
Matthew Wild [Sun, 31 Jan 2010 16:23:38 +0000 (16:23 +0000)]
net.server_select: Report whether a new listener uses SSL or not in the log message

14 years agoprosody: Only set the ssl_ctx for 'ssl' connections
Matthew Wild [Sun, 31 Jan 2010 16:22:52 +0000 (16:22 +0000)]
prosody: Only set the ssl_ctx for 'ssl' connections

14 years agonet.connlisteners: Remove redundant variable declaration
Matthew Wild [Sun, 31 Jan 2010 15:44:55 +0000 (15:44 +0000)]
net.connlisteners: Remove redundant variable declaration

14 years agonet.connlisteners: Update for new server API, type == 'tls' now means little - all...
Matthew Wild [Sun, 31 Jan 2010 15:44:05 +0000 (15:44 +0000)]
net.connlisteners: Update for new server API, type == 'tls' now means little - all connections support TLS

14 years agos2smanager: Update for new server SSL API (don't pass a sslctx)
Matthew Wild [Sun, 31 Jan 2010 15:41:33 +0000 (15:41 +0000)]
s2smanager: Update for new server SSL API (don't pass a sslctx)

14 years agomod_tls: Remove some redundant variable declarations
Matthew Wild [Sun, 31 Jan 2010 15:40:28 +0000 (15:40 +0000)]
mod_tls: Remove some redundant variable declarations

14 years agomod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s...
Matthew Wild [Sun, 31 Jan 2010 15:39:49 +0000 (15:39 +0000)]
mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted)

14 years agomod_tls: Update for new server SSL syntax
Matthew Wild [Sun, 31 Jan 2010 15:39:04 +0000 (15:39 +0000)]
mod_tls: Update for new server SSL syntax

14 years agonet.server_select: Remove startssl parameter to the client/server creation functions...
Matthew Wild [Sun, 31 Jan 2010 15:37:08 +0000 (15:37 +0000)]
net.server_select: Remove startssl parameter to the client/server creation functions - passing a sslctx now indicates you want to use SSL from the start

14 years agoMUC: muc.lib.lua: Fix the sending of the occupant JID instead of the nick in role...
Matthew Wild [Sat, 30 Jan 2010 18:51:07 +0000 (18:51 +0000)]
MUC: muc.lib.lua: Fix the sending of the occupant JID instead of the nick in role lists and presence broadcasts after role changes (thanks teo)

14 years agos2smanager: Fix syntax error)
Matthew Wild [Sat, 30 Jan 2010 18:45:46 +0000 (18:45 +0000)]
s2smanager: Fix syntax error)

14 years agos2smanager: require_s2s_encryption -> s2s_require_encryption
Matthew Wild [Sat, 30 Jan 2010 17:00:47 +0000 (17:00 +0000)]
s2smanager: require_s2s_encryption -> s2s_require_encryption

14 years agos2smanager: Make require_s2s_encryption do what it says on the tin
Matthew Wild [Sat, 30 Jan 2010 16:42:27 +0000 (16:42 +0000)]
s2smanager: Make require_s2s_encryption do what it says on the tin

14 years agohostmanager: Trailing whitespace
Matthew Wild [Fri, 29 Jan 2010 17:09:20 +0000 (17:09 +0000)]
hostmanager: Trailing whitespace

14 years agonet.server_event: Trailing whitespace
Matthew Wild [Fri, 29 Jan 2010 16:49:43 +0000 (16:49 +0000)]
net.server_event: Trailing whitespace

14 years agonet.server_event: Support :setlistener() method on connections to work with port...
Matthew Wild [Fri, 29 Jan 2010 16:46:28 +0000 (16:46 +0000)]
net.server_event: Support :setlistener() method on connections to work with port multiplexing

14 years agoMerge with trunk.
Waqas Hussain [Fri, 29 Jan 2010 16:15:33 +0000 (21:15 +0500)]
Merge with trunk.

14 years agomod_presence: Quick fix to make probes from local users to local hosts work.
Waqas Hussain [Fri, 29 Jan 2010 16:08:18 +0000 (21:08 +0500)]
mod_presence: Quick fix to make probes from local users to local hosts work.

14 years agomod_presence: Added handler for presence subscriptions and probes to local hosts.
Waqas Hussain [Fri, 29 Jan 2010 16:06:51 +0000 (21:06 +0500)]
mod_presence: Added handler for presence subscriptions and probes to local hosts.

14 years agostanza_router: Added third parameter to core_post_stanza, to control pre-events.
Waqas Hussain [Fri, 29 Jan 2010 16:04:36 +0000 (21:04 +0500)]
stanza_router: Added third parameter to core_post_stanza, to control pre-events.

14 years agoMUC: Fixes and refactoring for the previous commit to work in all cases, text of...
Matthew Wild [Fri, 29 Jan 2010 15:13:06 +0000 (15:13 +0000)]
MUC: Fixes and refactoring for the previous commit to work in all cases, text of error stanzas is now broadcast

14 years agoMUC: Show error message texts when participants are kicked for stanza errors
Matthew Wild [Fri, 29 Jan 2010 14:40:37 +0000 (14:40 +0000)]
MUC: Show error message texts when participants are kicked for stanza errors

14 years agoMUC: Have get_error_condition() use the new stanza:get_error() (muc.lib.lua 11 lines...
Matthew Wild [Fri, 29 Jan 2010 14:26:54 +0000 (14:26 +0000)]
MUC: Have get_error_condition() use the new stanza:get_error() (muc.lib.lua 11 lines shorter \o/)

14 years agoutil.stanza: Add stanza:get_error() to return type, condition and text of a stanza...
Matthew Wild [Fri, 29 Jan 2010 14:22:03 +0000 (14:22 +0000)]
util.stanza: Add stanza:get_error() to return type, condition and text of a stanza error

14 years agomod_presence: Respond with an unavailable presence when subscribers probe and no...
Waqas Hussain [Fri, 29 Jan 2010 13:16:39 +0000 (18:16 +0500)]
mod_presence: Respond with an unavailable presence when subscribers probe and no resources are available.

14 years agomod_privacy: A handful of logging fixes
Matthew Wild [Fri, 29 Jan 2010 13:02:06 +0000 (13:02 +0000)]
mod_privacy: A handful of logging fixes