prosody.git
11 years agoMerge 0.9->trunk
Kim Alvefur [Sat, 16 Mar 2013 17:49:14 +0000 (18:49 +0100)]
Merge 0.9->trunk

11 years agomod_s2s, mod_saslauth, mod_compression: Refactor to have common code for opening...
Kim Alvefur [Sat, 16 Mar 2013 16:46:43 +0000 (17:46 +0100)]
mod_s2s, mod_saslauth, mod_compression: Refactor to have common code for opening streams

11 years agocerts/openssl.cnf: Update XMPP-Core references to reflect RFC publication
Kim Alvefur [Fri, 15 Mar 2013 08:51:43 +0000 (09:51 +0100)]
certs/openssl.cnf: Update XMPP-Core references to reflect RFC publication

11 years agos2smanager: Use unused local, reduce table indexing
Kim Alvefur [Wed, 13 Mar 2013 06:33:36 +0000 (07:33 +0100)]
s2smanager: Use unused local, reduce table indexing

11 years agorostermanager: Remove unused imports
Kim Alvefur [Wed, 13 Mar 2013 06:03:34 +0000 (07:03 +0100)]
rostermanager: Remove unused imports

11 years agohostmanager: Import core_post_stanza from the global prosody table
Kim Alvefur [Wed, 13 Mar 2013 06:01:57 +0000 (07:01 +0100)]
hostmanager: Import core_post_stanza from the global prosody table

11 years agoMerge 0.9->trunk
Matthew Wild [Tue, 12 Mar 2013 12:30:35 +0000 (12:30 +0000)]
Merge 0.9->trunk

11 years agomod_s2s: Do not include xmlns:db declaration in stream header if mod_dialback is...
Matthew Wild [Tue, 12 Mar 2013 12:30:08 +0000 (12:30 +0000)]
mod_s2s: Do not include xmlns:db declaration in stream header if mod_dialback is not loaded

11 years agomod_s2s: Make sure host variable is reachable
Kim Alvefur [Mon, 11 Mar 2013 20:39:15 +0000 (21:39 +0100)]
mod_s2s: Make sure host variable is reachable

11 years agomod_s2s: Fire s2s-check-certificate event after validating a certificate, to allow...
Matthew Wild [Sun, 10 Mar 2013 17:49:07 +0000 (17:49 +0000)]
mod_s2s: Fire s2s-check-certificate event after validating a certificate, to allow plugins to override standard procedure

11 years agoMerge 0.9->trunk
Matthew Wild [Sun, 10 Mar 2013 11:29:47 +0000 (11:29 +0000)]
Merge 0.9->trunk

11 years agomod_s2s, mod_dialback: Rename s2s-authenticate-legacy event to s2sout-authenticate...
Matthew Wild [Sun, 10 Mar 2013 11:25:05 +0000 (11:25 +0000)]
mod_s2s, mod_dialback: Rename s2s-authenticate-legacy event to s2sout-authenticate-legacy for clarity. Also, hello!

11 years agonet.dns: Make sure argument to math.randomseed does not overflow a 32 bit unsigned...
Kim Alvefur [Tue, 5 Mar 2013 09:04:31 +0000 (10:04 +0100)]
net.dns: Make sure argument to math.randomseed does not overflow a 32 bit unsigned int. Closes #320

11 years agonet.server_event: Remove unused local
Kim Alvefur [Fri, 1 Mar 2013 13:15:38 +0000 (14:15 +0100)]
net.server_event: Remove unused local

11 years agonet.server_select: Optimization, clean bufferqueue when it makes sense.
Kim Alvefur [Fri, 1 Mar 2013 10:41:26 +0000 (11:41 +0100)]
net.server_select: Optimization, clean bufferqueue when it makes sense.

11 years agonet.server_select: Use # operator instead of string.len
Kim Alvefur [Fri, 1 Mar 2013 10:11:05 +0000 (11:11 +0100)]
net.server_select: Use # operator instead of string.len

11 years agomod_proxy65: Only handle service discovery requests when no node is present in the...
Waqas Hussain [Tue, 26 Feb 2013 18:57:44 +0000 (23:57 +0500)]
mod_proxy65: Only handle service discovery requests when no node is present in the request.

11 years agoMUC: Always return <service-unavailable/> when a node is present in service discovery...
Waqas Hussain [Tue, 26 Feb 2013 18:56:44 +0000 (23:56 +0500)]
MUC: Always return <service-unavailable/> when a node is present in service discovery requests.

11 years agoMUC: Fix affiliation check for admins, and bring it in line with the spec (thanks...
Waqas Hussain [Tue, 26 Feb 2013 15:31:41 +0000 (20:31 +0500)]
MUC: Fix affiliation check for admins, and bring it in line with the spec (thanks Maranda).

11 years agonet.http.server: Ensure HTTP callbacks are never called recursively for pipelined...
Waqas Hussain [Tue, 26 Feb 2013 14:41:52 +0000 (19:41 +0500)]
net.http.server: Ensure HTTP callbacks are never called recursively for pipelined requests.

11 years agomod_http: Expand $host in http_paths
Kim Alvefur [Mon, 18 Feb 2013 12:12:14 +0000 (13:12 +0100)]
mod_http: Expand $host in http_paths

11 years agonet.server_select: Limit global number of sockets passed to select.
Kim Alvefur [Tue, 12 Feb 2013 02:24:41 +0000 (03:24 +0100)]
net.server_select: Limit global number of sockets passed to select.

11 years agonet.server_select: Be less aggressive about server pause
Kim Alvefur [Tue, 12 Feb 2013 02:24:30 +0000 (03:24 +0100)]
net.server_select: Be less aggressive about server pause

11 years agomod_admin_adhoc: Fix 'Shut down service' command
Florian Zeitz [Thu, 7 Feb 2013 21:11:35 +0000 (22:11 +0100)]
mod_admin_adhoc: Fix 'Shut down service' command

11 years agomod_admin_adhoc: Implement global module unloading
Florian Zeitz [Thu, 7 Feb 2013 20:14:01 +0000 (21:14 +0100)]
mod_admin_adhoc: Implement global module unloading

11 years agomod_admin_adhoc: Implement global module reloading
Florian Zeitz [Wed, 6 Feb 2013 23:40:00 +0000 (00:40 +0100)]
mod_admin_adhoc: Implement global module reloading

11 years agomod_admin_adhoc: Fix info message for module reload/unload
Florian Zeitz [Tue, 5 Feb 2013 23:53:49 +0000 (00:53 +0100)]
mod_admin_adhoc: Fix info message for module reload/unload

11 years agomod_admin_adhoc: Implement global module loading
Florian Zeitz [Tue, 5 Feb 2013 23:51:25 +0000 (00:51 +0100)]
mod_admin_adhoc: Implement global module loading

11 years agomod_admin_adhoc: Remove a TODO, our pretty_print turns out not to be helpful after all
Florian Zeitz [Mon, 4 Feb 2013 23:43:14 +0000 (00:43 +0100)]
mod_admin_adhoc: Remove a TODO, our pretty_print turns out not to be helpful after all

11 years agonet.http.parser: Ensure full URL in status line contains a path.
Waqas Hussain [Thu, 7 Feb 2013 19:27:59 +0000 (00:27 +0500)]
net.http.parser: Ensure full URL in status line contains a path.

11 years agonet.http.parser: Fix traceback on invalid URL in status line.
Waqas Hussain [Thu, 7 Feb 2013 19:18:40 +0000 (00:18 +0500)]
net.http.parser: Fix traceback on invalid URL in status line.

11 years agoMerge 0.9->trunk
Kim Alvefur [Sun, 3 Feb 2013 14:52:27 +0000 (15:52 +0100)]
Merge 0.9->trunk

11 years agomod_pubsub, util.pubsub: Add delete action
Kim Alvefur [Thu, 31 Jan 2013 17:41:01 +0000 (18:41 +0100)]
mod_pubsub, util.pubsub: Add delete action

11 years agoportmanager: Make sure foo_ports is a table
Kim Alvefur [Thu, 31 Jan 2013 14:48:55 +0000 (15:48 +0100)]
portmanager: Make sure foo_ports is a table

11 years agomod_pubsub: More strict checks for node and ids
Kim Alvefur [Thu, 31 Jan 2013 14:33:41 +0000 (15:33 +0100)]
mod_pubsub: More strict checks for node and ids

11 years agomod_pubsub: Broadcast items correctly on new subscriptions
Kim Alvefur [Mon, 28 Jan 2013 00:06:05 +0000 (01:06 +0100)]
mod_pubsub: Broadcast items correctly on new subscriptions

11 years agomod_component: Look for the correct xmlns (thanks NebuK)
Kim Alvefur [Sun, 27 Jan 2013 16:11:45 +0000 (17:11 +0100)]
mod_component: Look for the correct xmlns (thanks NebuK)

11 years agoutil.pubsub: Fix nil access error in get_subscriptions.
Waqas Hussain [Fri, 25 Jan 2013 22:54:18 +0000 (03:54 +0500)]
util.pubsub: Fix nil access error in get_subscriptions.

11 years agomod_pubsub: require usermanager.
Waqas Hussain [Fri, 25 Jan 2013 22:50:13 +0000 (03:50 +0500)]
mod_pubsub: require usermanager.

11 years agomod_pubsub: Fix nil access error.
Waqas Hussain [Fri, 25 Jan 2013 22:49:45 +0000 (03:49 +0500)]
mod_pubsub: Fix nil access error.

11 years agomod_pubsub, util.pubsub: Don't send purge notifications in an <items/> element
Florian Zeitz [Fri, 25 Jan 2013 00:32:14 +0000 (01:32 +0100)]
mod_pubsub, util.pubsub: Don't send purge notifications in an <items/> element

11 years agoutil.xmppstream: Include error stanza in error message if no error handler is available.
Waqas Hussain [Fri, 25 Jan 2013 22:39:18 +0000 (03:39 +0500)]
util.xmppstream: Include error stanza in error message if no error handler is available.

11 years agoejabberd2prosody.lua: Don't make assumptions about file name.
Kim Alvefur [Thu, 24 Jan 2013 23:36:17 +0000 (00:36 +0100)]
ejabberd2prosody.lua: Don't make assumptions about file name.

11 years agoejabberd2prosody.lua: Replace util.logger with a dummy before requiring util.serializ...
Kim Alvefur [Thu, 24 Jan 2013 20:48:45 +0000 (21:48 +0100)]
ejabberd2prosody.lua: Replace util.logger with a dummy before requiring util.serialization

11 years agomod_pubsub: Ignore subscription options for now, fixes traceback due to missing form
Kim Alvefur [Thu, 24 Jan 2013 15:36:48 +0000 (16:36 +0100)]
mod_pubsub: Ignore subscription options for now, fixes traceback due to missing form

11 years agomod_s2s: Don't try to close sessions that were destroyed before timeout
Kim Alvefur [Wed, 23 Jan 2013 23:59:32 +0000 (00:59 +0100)]
mod_s2s: Don't try to close sessions that were destroyed before timeout

11 years agos2smanager: Generate session names used for logging the same way everywhere
Kim Alvefur [Wed, 23 Jan 2013 23:58:17 +0000 (00:58 +0100)]
s2smanager: Generate session names used for logging the same way everywhere

11 years agomod_pubsub, util.pubsub: Implement the purge action
Kim Alvefur [Wed, 23 Jan 2013 23:58:03 +0000 (00:58 +0100)]
mod_pubsub, util.pubsub: Implement the purge action

11 years agomod_pubsub: Advertise autocreate_on_publish correctly.
Kim Alvefur [Wed, 23 Jan 2013 21:41:18 +0000 (22:41 +0100)]
mod_pubsub: Advertise autocreate_on_publish correctly.

11 years agoMerge 0.9->trunk
Waqas Hussain [Tue, 22 Jan 2013 03:30:38 +0000 (08:30 +0500)]
Merge 0.9->trunk

11 years agomod_auth_internal_plain, mod_auth_internal_hashed: No need to nodeprep here.
Waqas Hussain [Tue, 22 Jan 2013 03:26:08 +0000 (08:26 +0500)]
mod_auth_internal_plain, mod_auth_internal_hashed: No need to nodeprep here.

11 years agoutil.sasl.{plain,scram,digest-md5}: nodeprep username before passing to callbacks...
Waqas Hussain [Tue, 22 Jan 2013 03:21:05 +0000 (08:21 +0500)]
util.sasl.{plain,scram,digest-md5}: nodeprep username before passing to callbacks, so callbacks don't have to.

11 years agonet.http.server: Properly handle persistent connections
Florian Zeitz [Sat, 12 Jan 2013 16:26:50 +0000 (17:26 +0100)]
net.http.server: Properly handle persistent connections

11 years agoutil.http: New module for HTTP helper functions
Florian Zeitz [Sat, 12 Jan 2013 15:55:39 +0000 (16:55 +0100)]
util.http: New module for HTTP helper functions

11 years agomod_component: Make listener private (thanks Ge0rG)
Kim Alvefur [Thu, 17 Jan 2013 20:57:35 +0000 (21:57 +0100)]
mod_component: Make listener private (thanks Ge0rG)

11 years agomod_presence: Put a timestamp on presence we store for probes
Kim Alvefur [Fri, 11 Jan 2013 18:38:29 +0000 (19:38 +0100)]
mod_presence: Put a timestamp on presence we store for probes

11 years agoprosodyctl, prosody: Pass the selected config file from prosodyctl to prosody
Kim Alvefur [Wed, 9 Jan 2013 21:01:52 +0000 (22:01 +0100)]
prosodyctl, prosody: Pass the selected config file from prosodyctl to prosody

11 years agoprosodyctl: Pop arg items after use. Fixes #306
Kim Alvefur [Wed, 9 Jan 2013 19:40:44 +0000 (20:40 +0100)]
prosodyctl: Pop arg items after use. Fixes #306

11 years agoMUC: Don't reply to errors (thanks iron)
Kim Alvefur [Wed, 9 Jan 2013 16:56:40 +0000 (17:56 +0100)]
MUC: Don't reply to errors (thanks iron)

11 years agoprosodyctl, prosody.cfg.lua.dist, certs/Makefile: Use .crt as suffix for certificates...
Kim Alvefur [Tue, 8 Jan 2013 20:20:00 +0000 (21:20 +0100)]
prosodyctl, prosody.cfg.lua.dist, certs/Makefile: Use .crt as suffix for certificates everywhere (thanks jasperixla)

11 years agoprosodyctl: Load LFS and util.openssl when actually needed (fixes unhelpful warnings...
Kim Alvefur [Tue, 8 Jan 2013 12:33:35 +0000 (13:33 +0100)]
prosodyctl: Load LFS and util.openssl when actually needed (fixes unhelpful warnings if no LuaSec installed)

11 years agonet.http.parser: Abort if no status line is received.
Kim Alvefur [Tue, 8 Jan 2013 12:33:01 +0000 (13:33 +0100)]
net.http.parser: Abort if no status line is received.

11 years agoutil.openssl: Cleanup; remove some unused variables.
Kim Alvefur [Mon, 7 Jan 2013 03:07:25 +0000 (04:07 +0100)]
util.openssl: Cleanup; remove some unused variables.

11 years agonet.server_select: Remove useless duplicated settimeout() call
Kim Alvefur [Mon, 7 Jan 2013 01:21:03 +0000 (02:21 +0100)]
net.server_select: Remove useless duplicated settimeout() call

11 years agonet.server_select: Fix global access
Kim Alvefur [Mon, 7 Jan 2013 01:20:43 +0000 (02:20 +0100)]
net.server_select: Fix global access

11 years agocertmanager: Fix nil index if no LuaSec available
Kim Alvefur [Mon, 7 Jan 2013 01:17:07 +0000 (02:17 +0100)]
certmanager: Fix nil index if no LuaSec available

11 years agonet.server_event: Optimize socket write buffers (don't do buf=buf..newdata).
Waqas Hussain [Sat, 5 Jan 2013 23:55:53 +0000 (04:55 +0500)]
net.server_event: Optimize socket write buffers (don't do buf=buf..newdata).

11 years agoMerge 0.9->trunk
Kim Alvefur [Sat, 29 Dec 2012 18:13:42 +0000 (19:13 +0100)]
Merge 0.9->trunk

11 years agonet.server: Don't return anything from config-reloaded hook, fixes logrotate heisenbug
Kim Alvefur [Sat, 29 Dec 2012 18:09:23 +0000 (19:09 +0100)]
net.server: Don't return anything from config-reloaded hook, fixes logrotate heisenbug

11 years agoMerge 0.9->trunk
Kim Alvefur [Fri, 28 Dec 2012 14:14:11 +0000 (15:14 +0100)]
Merge 0.9->trunk

11 years agocore.certmanager: Add support for LuaSec 0.5. Also compat with MattJs luasec-hg
Kim Alvefur [Fri, 28 Dec 2012 14:00:43 +0000 (15:00 +0100)]
core.certmanager: Add support for LuaSec 0.5. Also compat with MattJs luasec-hg

11 years agoprosody, mod_c2s, mod_s2s: Move closing of c2s and s2s sessions to respective plugins
Kim Alvefur [Fri, 28 Dec 2012 13:33:47 +0000 (14:33 +0100)]
prosody, mod_c2s, mod_s2s: Move closing of c2s and s2s sessions to respective plugins

11 years agonet.server_select: Pause servers while they are full
Kim Alvefur [Fri, 28 Dec 2012 13:33:27 +0000 (14:33 +0100)]
net.server_select: Pause servers while they are full

11 years agonet.server_select: Add pause and resume methods
Kim Alvefur [Fri, 28 Dec 2012 13:33:27 +0000 (14:33 +0100)]
net.server_select: Add pause and resume methods

11 years agomod_admin_telnet: Stop processing lines when session is closed
Kim Alvefur [Fri, 28 Dec 2012 13:32:22 +0000 (14:32 +0100)]
mod_admin_telnet: Stop processing lines when session is closed

11 years agonet.server_event: Destroy interfaces immediately, fixes reopening of servers.
Kim Alvefur [Fri, 28 Dec 2012 13:26:21 +0000 (14:26 +0100)]
net.server_event: Destroy interfaces immediately, fixes reopening of servers.

11 years agonet.server_event: Remove comments about not closing event handlers from within callba...
Kim Alvefur [Fri, 28 Dec 2012 13:25:11 +0000 (14:25 +0100)]
net.server_event: Remove comments about not closing event handlers from within callbacks, fixed in luaevent

11 years agoMerge 0.9->trunk
Matthew Wild [Fri, 28 Dec 2012 12:50:55 +0000 (12:50 +0000)]
Merge 0.9->trunk

11 years agomod_s2s: Remove connection from sessions table as soon as we learn it is disconnected...
Matthew Wild [Fri, 28 Dec 2012 12:47:44 +0000 (12:47 +0000)]
mod_s2s: Remove connection from sessions table as soon as we learn it is disconnected. Fixes a connection/session leak.

11 years agoMerge 0.9->trunk
Kim Alvefur [Fri, 28 Dec 2012 02:03:56 +0000 (03:03 +0100)]
Merge 0.9->trunk

11 years agocore.loggingmanager: Don't create file log rules from [level] = "*sink" style config
Kim Alvefur [Thu, 27 Dec 2012 19:44:58 +0000 (20:44 +0100)]
core.loggingmanager: Don't create file log rules from [level] = "*sink" style config

11 years agoMerge 0.9->trunk
Kim Alvefur [Wed, 26 Dec 2012 19:35:40 +0000 (20:35 +0100)]
Merge 0.9->trunk

11 years agomod_admin_telnet: Add info about port commands to help
Kim Alvefur [Wed, 26 Dec 2012 01:46:49 +0000 (02:46 +0100)]
mod_admin_telnet: Add info about port commands to help

11 years agomod_http_files: Fix sending Content-Type for index files
Kim Alvefur [Sun, 23 Dec 2012 16:04:44 +0000 (17:04 +0100)]
mod_http_files: Fix sending Content-Type for index files

11 years agomod_http_files: Allow passing a string to serve()
Kim Alvefur [Sun, 23 Dec 2012 10:17:44 +0000 (11:17 +0100)]
mod_http_files: Allow passing a string to serve()

11 years agonet.dns: Close voided sockets, so they don't stay in net.server
Kim Alvefur [Sat, 22 Dec 2012 13:20:12 +0000 (14:20 +0100)]
net.dns: Close voided sockets, so they don't stay in net.server

11 years agonet.dns: Clean up query list when a server is marked down
Matthew Wild [Sat, 22 Dec 2012 12:06:36 +0000 (12:06 +0000)]
net.dns: Clean up query list when a server is marked down

11 years agomod_http_files: Expose function other modules can use to combine their routes with...
Kim Alvefur [Fri, 21 Dec 2012 19:40:29 +0000 (20:40 +0100)]
mod_http_files: Expose function other modules can use to combine their routes with file paths to serve

11 years agomod_http_files: Work with non-wildcard-routes. Key cache on the original HTTP path.
Kim Alvefur [Fri, 21 Dec 2012 19:34:40 +0000 (20:34 +0100)]
mod_http_files: Work with non-wildcard-routes. Key cache on the original HTTP path.

11 years agomod_http_files: Replace file listing with an event, allowing a different plugin to...
Kim Alvefur [Fri, 21 Dec 2012 19:08:33 +0000 (20:08 +0100)]
mod_http_files: Replace file listing with an event, allowing a different plugin to generate it

11 years agomod_http_files: Export function can be used by other modules to serve files. Don...
Kim Alvefur [Fri, 21 Dec 2012 16:54:43 +0000 (17:54 +0100)]
mod_http_files: Export function can be used by other modules to serve files. Don't serve files by default unless http_files_dir is set

11 years agomod_http_files: Rename config options and variable names
Kim Alvefur [Fri, 21 Dec 2012 16:22:19 +0000 (17:22 +0100)]
mod_http_files: Rename config options and variable names

11 years agomod_http_files: Log the error if we can't open or read a file
Kim Alvefur [Fri, 21 Dec 2012 15:10:45 +0000 (16:10 +0100)]
mod_http_files: Log the error if we can't open or read a file

11 years agonet.http.parser: Skip url.parse when we don't have a full URL (also fixes traceback...
Waqas Hussain [Fri, 21 Dec 2012 08:37:39 +0000 (13:37 +0500)]
net.http.parser: Skip url.parse when we don't have a full URL (also fixes traceback on paths starting with '//').

11 years agoMerge 0.9->trunk
Kim Alvefur [Fri, 21 Dec 2012 08:04:54 +0000 (09:04 +0100)]
Merge 0.9->trunk

11 years agomod_http_files: Escape paths in redirects
Kim Alvefur [Fri, 21 Dec 2012 08:04:02 +0000 (09:04 +0100)]
mod_http_files: Escape paths in redirects

11 years agomod_http_files: Only match on modification date when if-none-match is not present
Kim Alvefur [Fri, 21 Dec 2012 07:27:14 +0000 (08:27 +0100)]
mod_http_files: Only match on modification date when if-none-match is not present

11 years agomod_http_files: Only serve cached data if etag is unchanged.
Kim Alvefur [Fri, 21 Dec 2012 07:25:09 +0000 (08:25 +0100)]
mod_http_files: Only serve cached data if etag is unchanged.

11 years agomod_http_files: Make sure file extensions are not nil or empty string
Kim Alvefur [Fri, 21 Dec 2012 07:19:58 +0000 (08:19 +0100)]
mod_http_files: Make sure file extensions are not nil or empty string

11 years agomod_http_files: Avoid a bunch of table lookups
Kim Alvefur [Fri, 21 Dec 2012 07:14:33 +0000 (08:14 +0100)]
mod_http_files: Avoid a bunch of table lookups