prosody.git
12 years agoprosody: Define a getfenv() replacement for Lua 5.2
Florian Zeitz [Fri, 8 Jun 2012 23:18:21 +0000 (01:18 +0200)]
prosody: Define a getfenv() replacement for Lua 5.2

12 years agoEliminate direct setfenv usage
Florian Zeitz [Fri, 8 Jun 2012 03:04:38 +0000 (05:04 +0200)]
Eliminate direct setfenv usage

12 years agoutil.envload: New module to abstract Lua 5.1's setfenv and Lua 5.2's load
Florian Zeitz [Thu, 7 Jun 2012 21:27:26 +0000 (23:27 +0200)]
util.envload: New module to abstract Lua 5.1's setfenv and Lua 5.2's load

11 years agomod_dialback: Ignore <db:verify/> with a 'type' attribute on incoming connections...
Matthew Wild [Fri, 27 Jul 2012 19:29:32 +0000 (20:29 +0100)]
mod_dialback: Ignore <db:verify/> with a 'type' attribute on incoming connections, instead of interpreting them as a request to verify a key

11 years agonet.server_event: Replace usage of string.len() with # operator
Matthew Wild [Thu, 26 Jul 2012 15:46:18 +0000 (16:46 +0100)]
net.server_event: Replace usage of string.len() with # operator

11 years agomod_vcard: Remove vcard_compatibility COMPAT (moved to mod_compat_vcard in prosody...
Matthew Wild [Thu, 26 Jul 2012 14:16:52 +0000 (15:16 +0100)]
mod_vcard: Remove vcard_compatibility COMPAT (moved to mod_compat_vcard in prosody-modules), and add warning for those using the option

11 years agomod_muc: Remove unused variable and pull hosts into a local
Kim Alvefur [Thu, 26 Jul 2012 02:45:22 +0000 (04:45 +0200)]
mod_muc: Remove unused variable and pull hosts into a local

11 years agomod_muc: Use module:send() instead of core_*_stanza()
Kim Alvefur [Thu, 26 Jul 2012 02:41:56 +0000 (04:41 +0200)]
mod_muc: Use module:send() instead of core_*_stanza()

11 years agomod_announce, mod_motd, mod_pubsub, mod_register, mod_watchregistrations, mod_welcome...
Kim Alvefur [Thu, 26 Jul 2012 02:35:13 +0000 (04:35 +0200)]
mod_announce, mod_motd, mod_pubsub, mod_register, mod_watchregistrations, mod_welcome: Use module:send() instead of core_*_stanza()

11 years agomod_admin_adhoc, mod_admin_telnet, mod_bosh, mod_c2s, mod_component, mod_pep, mod_pre...
Kim Alvefur [Thu, 26 Jul 2012 02:33:17 +0000 (04:33 +0200)]
mod_admin_adhoc, mod_admin_telnet, mod_bosh, mod_c2s, mod_component, mod_pep, mod_presence, mod_roster, mod_s2s: Import core_post_stanza from the global prosody table.

11 years agostanza_router: Warn if the global core_*_stanza() functions are called
Kim Alvefur [Thu, 26 Jul 2012 02:30:30 +0000 (04:30 +0200)]
stanza_router: Warn if the global core_*_stanza() functions are called

11 years agomod_admin_telnet: Add xmpp:ping(from, to), useful for initiating s2s connections
Kim Alvefur [Thu, 26 Jul 2012 00:27:24 +0000 (02:27 +0200)]
mod_admin_telnet: Add xmpp:ping(from, to), useful for initiating s2s connections

11 years agonet.server_event: Don't emit empty packets, check for errors first. (fixes #287)
Kim Alvefur [Wed, 25 Jul 2012 18:33:20 +0000 (20:33 +0200)]
net.server_event: Don't emit empty packets, check for errors first. (fixes #287)

11 years agoportmanager: Show a friendly error message when initializing SSL fails (thanks MattJ...
Kim Alvefur [Wed, 25 Jul 2012 18:31:14 +0000 (20:31 +0200)]
portmanager: Show a friendly error message when initializing SSL fails (thanks MattJ for the entire patch that I fixed one line in)

11 years agoMerge with Zash
Matthew Wild [Wed, 25 Jul 2012 17:51:49 +0000 (18:51 +0100)]
Merge with Zash

11 years agomod_pep: Allow configurable service discovery identity (Fix)
IRON [Wed, 25 Jul 2012 16:04:42 +0000 (19:04 +0300)]
mod_pep: Allow configurable service discovery identity (Fix)

11 years agoMerge with IRON
Matthew Wild [Wed, 25 Jul 2012 15:57:22 +0000 (16:57 +0100)]
Merge with IRON

11 years agomod_pep: Allow configurable service discovery identity
IRON [Wed, 25 Jul 2012 15:49:13 +0000 (18:49 +0300)]
mod_pep: Allow configurable service discovery identity

11 years agomod_admin_telnet: Remove useless call to string.lower()
Kim Alvefur [Tue, 24 Jul 2012 20:03:51 +0000 (22:03 +0200)]
mod_admin_telnet: Remove useless call to string.lower()

11 years agomod_admin_telnet: Add missing import of usermanager
Kim Alvefur [Tue, 24 Jul 2012 19:37:16 +0000 (21:37 +0200)]
mod_admin_telnet: Add missing import of usermanager

11 years agomod_admin_telnet: Remove unused or duplicated locals
Kim Alvefur [Tue, 24 Jul 2012 19:36:47 +0000 (21:36 +0200)]
mod_admin_telnet: Remove unused or duplicated locals

11 years agologgingmanager: Remove unused variables
Matthew Wild [Tue, 24 Jul 2012 14:50:11 +0000 (15:50 +0100)]
loggingmanager: Remove unused variables

11 years agomod_auth_cyrus, util.sasl_cyrus: Add new option 'cyrus_server_fqdn' to override the...
Matthew Wild [Tue, 24 Jul 2012 09:56:47 +0000 (10:56 +0100)]
mod_auth_cyrus, util.sasl_cyrus: Add new option 'cyrus_server_fqdn' to override the hostname passed to Cyrus (and used in e.g. GSSAPI/Kerberos) - fixes #295

11 years agomod_muc: Fix a couple of cases of 'forbidden' stanza error being sent with type ...
Matthew Wild [Tue, 24 Jul 2012 09:44:37 +0000 (10:44 +0100)]
mod_muc: Fix a couple of cases of 'forbidden' stanza error being sent with type 'cancel' - fixes #303

11 years agomod_bosh: Use new format for headers when checking for proxies to get the originating IP
Kim Alvefur [Mon, 23 Jul 2012 21:05:32 +0000 (23:05 +0200)]
mod_bosh: Use new format for headers when checking for proxies to get the originating IP

11 years agomod_s2s: Bump s2s_timeout to 90, to allow for the TCP timeout (in most cases) - this...
Matthew Wild [Mon, 23 Jul 2012 17:57:28 +0000 (18:57 +0100)]
mod_s2s: Bump s2s_timeout to 90, to allow for the TCP timeout (in most cases) - this allows us to continue to try other targets

11 years agomod_c2s, mod_s2s: Lower 'Disconnecting X' log messages from 'info' to 'debug'
Matthew Wild [Mon, 23 Jul 2012 17:28:14 +0000 (18:28 +0100)]
mod_c2s, mod_s2s: Lower 'Disconnecting X' log messages from 'info' to 'debug'

11 years agosessionmanager: Lower 'destroying session' message to 'debug' level (from 'info')
Matthew Wild [Mon, 23 Jul 2012 17:26:30 +0000 (18:26 +0100)]
sessionmanager: Lower 'destroying session' message to 'debug' level (from 'info')

11 years agos2smanager: Remove logging of (unknown) in a case where from_host and to_host should...
Matthew Wild [Mon, 23 Jul 2012 16:35:18 +0000 (17:35 +0100)]
s2smanager: Remove logging of (unknown) in a case where from_host and to_host should always be set

11 years agoHopefully inert commit to clean up logging across a number of modules, removing all...
Matthew Wild [Mon, 23 Jul 2012 16:32:33 +0000 (17:32 +0100)]
Hopefully inert commit to clean up logging across a number of modules, removing all cases of concatenation when building log messages

11 years agocertmanager: Remove unused import of setmetatable
Matthew Wild [Mon, 23 Jul 2012 15:42:26 +0000 (16:42 +0100)]
certmanager: Remove unused import of setmetatable

11 years agocertmanager: Fix for traceback WITH LuaSec... (!) (thanks IRON)
Matthew Wild [Mon, 23 Jul 2012 15:39:49 +0000 (16:39 +0100)]
certmanager: Fix for traceback WITH LuaSec... (!) (thanks IRON)

11 years agocertmanager: Fix traceback for missing LuaSec (thanks Link Mauve)
Matthew Wild [Mon, 23 Jul 2012 13:17:42 +0000 (14:17 +0100)]
certmanager: Fix traceback for missing LuaSec (thanks Link Mauve)

11 years agomod_admin_telnet: Always handle commands terminated by line feeds - ensures consisten...
Matthew Wild [Mon, 23 Jul 2012 13:03:00 +0000 (14:03 +0100)]
mod_admin_telnet: Always handle commands terminated by line feeds - ensures consistency even when packets are joined or split on the network

11 years agomod_s2s: Adjust session:close() in line with mod_c2s's - fixes waiting for </stream...
Matthew Wild [Mon, 23 Jul 2012 12:31:26 +0000 (13:31 +0100)]
mod_s2s: Adjust session:close() in line with mod_c2s's - fixes waiting for </stream:stream> if it has already been sent by the peer

11 years agomod_s2s/s2sout.lib: Use %s to insert strings into log messages instead of concatenation
Matthew Wild [Mon, 23 Jul 2012 12:29:33 +0000 (13:29 +0100)]
mod_s2s/s2sout.lib: Use %s to insert strings into log messages instead of concatenation

11 years agomod_c2s: Change 'reason' parameter of session:close() to take nil to mean 'graceful...
Matthew Wild [Mon, 23 Jul 2012 11:56:47 +0000 (12:56 +0100)]
mod_c2s: Change 'reason' parameter of session:close() to take nil to mean 'graceful close initiated by us' and false for 'graceful close initiated by client'

11 years agomod_disco: Allow configurable name in disco identity (defaults to 'Prosody')
Matthew Wild [Mon, 23 Jul 2012 11:25:33 +0000 (12:25 +0100)]
mod_disco: Allow configurable name in disco identity (defaults to 'Prosody')

11 years agonet.server_event: Remove unused variables and imports
Matthew Wild [Sun, 22 Jul 2012 22:45:53 +0000 (23:45 +0100)]
net.server_event: Remove unused variables and imports

11 years agonet.server_select: Remove unused variables and imports
Matthew Wild [Sun, 22 Jul 2012 22:41:33 +0000 (23:41 +0100)]
net.server_select: Remove unused variables and imports

11 years agonet.server_select: Remove extraneous variable
Matthew Wild [Sun, 22 Jul 2012 22:39:27 +0000 (23:39 +0100)]
net.server_select: Remove extraneous variable

11 years agosessionmanager: Clean up some unused variables and imports
Matthew Wild [Sun, 22 Jul 2012 22:38:21 +0000 (23:38 +0100)]
sessionmanager: Clean up some unused variables and imports

11 years agonet.server_select: Never call ondisconnect() directly, go via handler:close() or...
Matthew Wild [Sun, 22 Jul 2012 21:12:17 +0000 (22:12 +0100)]
net.server_select: Never call ondisconnect() directly, go via handler:close() or handler:force_close() - fixes cases where ondisconnect() could be called multiple times for the same connection, leading to issues with s2sout retry logic.

11 years agoMerge with Maranda
Matthew Wild [Sun, 22 Jul 2012 17:52:20 +0000 (18:52 +0100)]
Merge with Maranda

11 years agoMerge with Zash
Matthew Wild [Sun, 22 Jul 2012 17:47:40 +0000 (18:47 +0100)]
Merge with Zash

11 years agoMerge Zash with Zash for Zash
Matthew Wild [Sun, 22 Jul 2012 17:46:49 +0000 (18:46 +0100)]
Merge Zash with Zash for Zash

11 years agomod_admin_telnet: Replace anonymous function with loop (saves a closure)
Matthew Wild [Sun, 22 Jul 2012 17:00:59 +0000 (18:00 +0100)]
mod_admin_telnet: Replace anonymous function with loop (saves a closure)

11 years agoMerge 0.9->trunk
Matthew Wild [Sun, 22 Jul 2012 16:08:09 +0000 (17:08 +0100)]
Merge 0.9->trunk

11 years agomod_s2s: Don't call ondisconnect manually, don't call conn:close() 3 times (!) and...
Matthew Wild [Sun, 22 Jul 2012 16:07:21 +0000 (17:07 +0100)]
mod_s2s: Don't call ondisconnect manually, don't call conn:close() 3 times (!) and merge its logic and streamdisconnected into session_close - including now waiting for a reply </stream:stream> if there is the chance of further stanzas requiring delivery arriving. session.sends2s() on a half-closed stream returns false.

11 years agomod_s2s: Don't treat a stanza as delivered if session.sends2s() returns false
Matthew Wild [Sun, 22 Jul 2012 16:04:02 +0000 (17:04 +0100)]
mod_s2s: Don't treat a stanza as delivered if session.sends2s() returns false

11 years agomod_presence: Handle nil disconnection error
Matthew Wild [Sun, 22 Jul 2012 16:02:18 +0000 (17:02 +0100)]
mod_presence: Handle nil disconnection error

11 years agomod_iq: Don't treat an iq as handled if session.send() returns false
Matthew Wild [Sun, 22 Jul 2012 16:01:52 +0000 (17:01 +0100)]
mod_iq: Don't treat an iq as handled if session.send() returns false

11 years agomod_message: Don't treat a message as delivered ok if session.send() returns false
Matthew Wild [Sun, 22 Jul 2012 15:59:55 +0000 (16:59 +0100)]
mod_message: Don't treat a message as delivered ok if session.send() returns false

11 years agomod_c2s: Don't call ondisconnect manually on close, it is now called by net.server...
Matthew Wild [Sun, 22 Jul 2012 15:59:12 +0000 (16:59 +0100)]
mod_c2s: Don't call ondisconnect manually on close, it is now called by net.server. Replace with inline code for destroying the session, and also waiting for a reply </stream:stream> if there is a chance of further data sent by the client. session.send() on a half-closed stream returns false (and does not deliver the data).

11 years agonet.http: Don't call ondisconnect manually, net.server now calls it on close
Matthew Wild [Sun, 22 Jul 2012 15:54:58 +0000 (16:54 +0100)]
net.http: Don't call ondisconnect manually, net.server now calls it on close

11 years agonet.server_select, net.server_event: Change semantics of conn:close() - always call...
Matthew Wild [Sun, 22 Jul 2012 15:54:33 +0000 (16:54 +0100)]
net.server_select, net.server_event: Change semantics of conn:close() - always call ondisconnect (with err == nil), and never close with data in send buffer (i.e. 'now' parameter removed)

11 years agosessionmanager: Have session.send() of a retired session return false to indicate...
Matthew Wild [Sun, 22 Jul 2012 15:50:14 +0000 (16:50 +0100)]
sessionmanager: Have session.send() of a retired session return false to indicate failure

11 years agomod_s2s: Make unauthed session timeout a little more aggressive... otherwise it's...
Matthew Wild [Sun, 22 Jul 2012 15:45:27 +0000 (16:45 +0100)]
mod_s2s: Make unauthed session timeout a little more aggressive... otherwise it's possible for sessions to slip under the net and never get killed off

11 years agomod_s2s/s2sout.lib: Fix indentation
Matthew Wild [Sun, 22 Jul 2012 15:29:52 +0000 (16:29 +0100)]
mod_s2s/s2sout.lib: Fix indentation

11 years agoMerge 0.9->trunk
Matthew Wild [Sun, 22 Jul 2012 15:17:33 +0000 (16:17 +0100)]
Merge 0.9->trunk

11 years agomod_s2s/s2sout.lib: Don't wait for both v4 and v6 DNS responses if we only send one...
Matthew Wild [Sun, 22 Jul 2012 15:17:04 +0000 (16:17 +0100)]
mod_s2s/s2sout.lib: Don't wait for both v4 and v6 DNS responses if we only send one (e.g. because v6 is disabled)

11 years agoMerge 0.9->trunk
Matthew Wild [Thu, 19 Jul 2012 14:36:31 +0000 (15:36 +0100)]
Merge 0.9->trunk

11 years agomod_admin_adhoc: Remove unused variable and save a bit of CPU...
Matthew Wild [Thu, 19 Jul 2012 14:36:16 +0000 (15:36 +0100)]
mod_admin_adhoc: Remove unused variable and save a bit of CPU...

11 years agomoduleapi: Remove unused import of util.multitable
Matthew Wild [Thu, 19 Jul 2012 14:35:07 +0000 (15:35 +0100)]
moduleapi: Remove unused import of util.multitable

11 years agoadhoc.lib: Make some globals local
Kim Alvefur [Wed, 18 Jul 2012 19:18:17 +0000 (21:18 +0200)]
adhoc.lib: Make some globals local

11 years agomod_admin_telnet: add s2s:closeall command and relative help entry.
Marco Cirillo [Mon, 9 Jul 2012 19:50:11 +0000 (19:50 +0000)]
mod_admin_telnet: add s2s:closeall command and relative help entry.

11 years agomod_admin_telnet: Add info about user management commands to the help
Kim Alvefur [Mon, 9 Jul 2012 18:39:55 +0000 (20:39 +0200)]
mod_admin_telnet: Add info about user management commands to the help

11 years agomod_admin_telnet: Add some user management commands.
Kim Alvefur [Mon, 9 Jul 2012 18:21:47 +0000 (20:21 +0200)]
mod_admin_telnet: Add some user management commands.

11 years agoMerge 0.9->trunk
Matthew Wild [Mon, 9 Jul 2012 01:36:09 +0000 (02:36 +0100)]
Merge 0.9->trunk

11 years agoutil.throttle: floor() internal balance calculation
Matthew Wild [Mon, 9 Jul 2012 01:35:47 +0000 (02:35 +0100)]
util.throttle: floor() internal balance calculation

11 years agoMerge 0.9->trunk
Matthew Wild [Sun, 8 Jul 2012 17:54:56 +0000 (18:54 +0100)]
Merge 0.9->trunk

11 years agoutil.pposix: Add comments to mallinfo fields we use, so I don't forget tomorrow what...
Matthew Wild [Sun, 8 Jul 2012 17:54:30 +0000 (18:54 +0100)]
util.pposix: Add comments to mallinfo fields we use, so I don't forget tomorrow what they mean

11 years agoMerge 0.9->trunk
Matthew Wild [Sun, 8 Jul 2012 17:49:44 +0000 (18:49 +0100)]
Merge 0.9->trunk

11 years agoMerge with backout
Matthew Wild [Sun, 8 Jul 2012 17:48:28 +0000 (18:48 +0100)]
Merge with backout

11 years agoBacked out changeset 72a2eec4204a (incomplete fix)
Matthew Wild [Sun, 8 Jul 2012 17:48:22 +0000 (18:48 +0100)]
Backed out changeset 72a2eec4204a (incomplete fix)

11 years agoutil.pposix: Add meminfo() binding to memory allocation stats provided by mallinfo...
Matthew Wild [Sun, 8 Jul 2012 17:47:05 +0000 (18:47 +0100)]
util.pposix: Add meminfo() binding to memory allocation stats provided by mallinfo() [compilation tested on Ubuntu...]

11 years agonet.http: Use base64 from util.encodings instead of luasocket
Kim Alvefur [Sat, 7 Jul 2012 21:22:15 +0000 (23:22 +0200)]
net.http: Use base64 from util.encodings instead of luasocket

11 years agoMerge 0.9->trunk
Matthew Wild [Sat, 7 Jul 2012 01:43:57 +0000 (02:43 +0100)]
Merge 0.9->trunk

11 years agomod_auth_anonymous: Attach a fake roster to the session, so the null storage backend...
Kim Alvefur [Sat, 7 Jul 2012 01:42:31 +0000 (03:42 +0200)]
mod_auth_anonymous: Attach a fake roster to the session, so the null storage backend can be used

11 years agousermanager: Pass session on to auth provider (missing half of commit 0545a574667b...
Matthew Wild [Sat, 7 Jul 2012 01:32:39 +0000 (02:32 +0100)]
usermanager: Pass session on to auth provider (missing half of commit 0545a574667b) (thanks Zash)

11 years agoMerge 0.9->trunk
Matthew Wild [Thu, 5 Jul 2012 16:42:19 +0000 (17:42 +0100)]
Merge 0.9->trunk

11 years agoMerge (some of) trunk -> 0.9
Matthew Wild [Thu, 5 Jul 2012 16:41:57 +0000 (17:41 +0100)]
Merge (some of) trunk -> 0.9

11 years agoMerge 0.9->trunk
Matthew Wild [Thu, 5 Jul 2012 16:40:12 +0000 (17:40 +0100)]
Merge 0.9->trunk

11 years agomod_saslauth: Pass session to usermanager.get_sasl_handler()
Matthew Wild [Wed, 4 Jul 2012 22:44:13 +0000 (23:44 +0100)]
mod_saslauth: Pass session to usermanager.get_sasl_handler()

11 years agoTODO: Add statistics
Matthew Wild [Wed, 4 Jul 2012 22:43:18 +0000 (23:43 +0100)]
TODO: Add statistics

11 years agomod_admin_web: Use util.dataforms' own error checking
Florian Zeitz [Wed, 4 Jul 2012 22:15:49 +0000 (00:15 +0200)]
mod_admin_web: Use util.dataforms' own error checking

12 years agoutil.logger: Remove some redundant code
Matthew Wild [Sun, 24 Jun 2012 23:16:08 +0000 (00:16 +0100)]
util.logger: Remove some redundant code

11 years agoutil.stanza: Make stanza:childtags() behave like :get_child()
Kim Alvefur [Thu, 5 Jul 2012 15:58:47 +0000 (17:58 +0200)]
util.stanza: Make stanza:childtags() behave like :get_child()

11 years agoprosodyctl: Fix typo
Kim Alvefur [Tue, 3 Jul 2012 13:56:32 +0000 (15:56 +0200)]
prosodyctl: Fix typo

11 years agoutil.pposix: Add setenv()
Kim Alvefur [Tue, 3 Jul 2012 13:43:46 +0000 (15:43 +0200)]
util.pposix: Add setenv()

12 years agoutil.sasl: Make registerMechanism a public function
Matthew Wild [Mon, 18 Jun 2012 15:57:46 +0000 (16:57 +0100)]
util.sasl: Make registerMechanism a public function

12 years agomod_dialback: Skip an unnecessary nameprep.
Waqas Hussain [Thu, 14 Jun 2012 21:53:57 +0000 (02:53 +0500)]
mod_dialback: Skip an unnecessary nameprep.

12 years agos2smanager: Fix a traceback when we close a s2s connection ourselves (thanks for...
Waqas Hussain [Wed, 13 Jun 2012 06:47:04 +0000 (11:47 +0500)]
s2smanager: Fix a traceback when we close a s2s connection ourselves (thanks for the testing Zash).

12 years agoMerge 0.9->trunk
Matthew Wild [Tue, 12 Jun 2012 16:31:55 +0000 (17:31 +0100)]
Merge 0.9->trunk

12 years agoutil.dataforms: Fix parsing of -multi fields
Florian Zeitz [Tue, 12 Jun 2012 16:29:58 +0000 (18:29 +0200)]
util.dataforms: Fix parsing of -multi fields

12 years agoMerge with trunk
Matthew Wild [Tue, 12 Jun 2012 12:55:56 +0000 (13:55 +0100)]
Merge with trunk

12 years agomod_adhoc, mod_admin_adhoc, mod_announce: Use module:provides() to manage Ad-Hoc...
Florian Zeitz [Tue, 12 Jun 2012 12:29:04 +0000 (14:29 +0200)]
mod_adhoc, mod_admin_adhoc, mod_announce: Use module:provides() to manage Ad-Hoc commands

12 years agocertmanager: Add quotes around cert file path when logging.
Waqas Hussain [Tue, 12 Jun 2012 12:02:35 +0000 (17:02 +0500)]
certmanager: Add quotes around cert file path when logging.

12 years agoMUC: Handle missing persistent room data.
Waqas Hussain [Tue, 12 Jun 2012 11:55:27 +0000 (16:55 +0500)]
MUC: Handle missing persistent room data.

12 years agomod_s2s: Remove check for socket.tcp6()
Kim Alvefur [Tue, 29 May 2012 16:04:29 +0000 (18:04 +0200)]
mod_s2s: Remove check for socket.tcp6()