prosody.git
12 years agomod_watchregistrations: Convert JID list to a set, and prep before use to fix traceba...
Matthew Wild [Thu, 24 May 2012 17:52:47 +0000 (18:52 +0100)]
mod_watchregistrations: Convert JID list to a set, and prep before use to fix traceback on invalid JIDs (thanks sMi)

12 years agoutil.set: Change '/' operator from filter to map+filter (nil to drop from set, false...
Matthew Wild [Thu, 24 May 2012 17:51:18 +0000 (18:51 +0100)]
util.set: Change '/' operator from filter to map+filter (nil to drop from set, false is a valid item). No code found which depends on current behaviour.

12 years agonet.server_event: Internal changes to get plain-SSL outgoing connections working...
Matthew Wild [Thu, 24 May 2012 02:33:14 +0000 (03:33 +0100)]
net.server_event: Internal changes to get plain-SSL outgoing connections working (as for HTTPS)

12 years agomod_s2s, s2sout.lib: Send stream header in onconnect()
Matthew Wild [Thu, 24 May 2012 02:08:42 +0000 (03:08 +0100)]
mod_s2s, s2sout.lib: Send stream header in onconnect()

12 years agonet.server_event: Assume wrapclient() is taking a new connection, and call onconnect...
Matthew Wild [Thu, 24 May 2012 01:55:37 +0000 (02:55 +0100)]
net.server_event: Assume wrapclient() is taking a new connection, and call onconnect when appropriate (to match server_select)

12 years agonet.server_select: Don't close client connections when closing a server (it wasn...
Matthew Wild [Wed, 23 May 2012 01:20:32 +0000 (02:20 +0100)]
net.server_select: Don't close client connections when closing a server (it wasn't working anyway)

12 years agonet.server_select: Call ondisconnect handler, even if we closed the socket ourselves...
Matthew Wild [Wed, 23 May 2012 01:19:11 +0000 (02:19 +0100)]
net.server_select: Call ondisconnect handler, even if we closed the socket ourselves (fixes HTTP session hoarding, thanks Maranda)

12 years agoportmanager: Match service against service_info (:iter() doesn't match values)
Matthew Wild [Tue, 22 May 2012 13:33:06 +0000 (14:33 +0100)]
portmanager: Match service against service_info (:iter() doesn't match values)

12 years agoutil.multitable: Some fixes for iter()... always match against query, and pass value...
Matthew Wild [Tue, 22 May 2012 13:31:19 +0000 (14:31 +0100)]
util.multitable: Some fixes for iter()... always match against query, and pass value after path results

12 years agocertmanager: tonumber() (fix for 0b8134015635)
Matthew Wild [Sat, 19 May 2012 20:57:40 +0000 (21:57 +0100)]
certmanager: tonumber() (fix for 0b8134015635)

12 years agocertmanager: Don't use no_ticket option before LuaSec 0.4
Matthew Wild [Sat, 19 May 2012 20:53:43 +0000 (21:53 +0100)]
certmanager: Don't use no_ticket option before LuaSec 0.4

12 years agomod_compression: advertise/activate compression only for authenticated sessions in...
Tobias Markmann [Sat, 19 May 2012 20:05:23 +0000 (22:05 +0200)]
mod_compression: advertise/activate compression only for authenticated sessions in accordance to XEP-0170. (Thanks fippo)

12 years agoportmanager: Fix to deactivate services when they are unregistered (metatable:iter...
Matthew Wild [Sat, 19 May 2012 19:46:44 +0000 (20:46 +0100)]
portmanager: Fix to deactivate services when they are unregistered (metatable:iter() wins)

12 years agomodulemanager, moduleapi: Turn module.event_handlers into a multitable and track...
Matthew Wild [Sat, 19 May 2012 14:39:16 +0000 (15:39 +0100)]
modulemanager, moduleapi: Turn module.event_handlers into a multitable and track object->event->handler associations correctly (thanks Zash)

12 years agoutil.multitable: No longer use table.remove to drop elements from the stack, when...
Matthew Wild [Sat, 19 May 2012 14:35:49 +0000 (15:35 +0100)]
util.multitable: No longer use table.remove to drop elements from the stack, when key is nil immediately (on empty tables) the previous stack entry's key gets removed instead

12 years agoutil.multitable: Add :iter() method to iterate over results at a fixed depth (paramet...
Matthew Wild [Sat, 19 May 2012 03:12:41 +0000 (04:12 +0100)]
util.multitable: Add :iter() method to iterate over results at a fixed depth (parameters are equivalent to :search())

12 years agomoduleapi, modulemanager: Re-structure module.event_handlers so that the same handler...
Matthew Wild [Fri, 18 May 2012 22:53:02 +0000 (23:53 +0100)]
moduleapi, modulemanager: Re-structure module.event_handlers so that the same handler can harmlessly handle multiple events (thanks Zash)

12 years agomod_http: Add module:http_url([app_name,][default_path]) for a module to get a guess...
Matthew Wild [Fri, 18 May 2012 03:24:33 +0000 (04:24 +0100)]
mod_http: Add module:http_url([app_name,][default_path]) for a module to get a guess at its external URL

12 years agoutil.watchdog: Pass watchdog object to callback so that it doesn't always have to...
Matthew Wild [Fri, 18 May 2012 03:22:51 +0000 (04:22 +0100)]
util.watchdog: Pass watchdog object to callback so that it doesn't always have to be a closure

12 years agocertmanager: no_ticket is not a verification option (thanks Zash)
Matthew Wild [Fri, 18 May 2012 00:50:51 +0000 (01:50 +0100)]
certmanager: no_ticket is not a verification option (thanks Zash)

12 years agocertmanager: Add no_ticket option for OpenSSL (we don't support resumption yet)
Matthew Wild [Thu, 17 May 2012 23:31:23 +0000 (00:31 +0100)]
certmanager: Add no_ticket option for OpenSSL (we don't support resumption yet)

12 years agonet.server_select: Return error when SSL handshake fails immediately (thanks Zash)
Matthew Wild [Thu, 17 May 2012 23:27:06 +0000 (00:27 +0100)]
net.server_select: Return error when SSL handshake fails immediately (thanks Zash)

12 years agoutil.dataforms: Don't return invalid JIDs in jid-single.
Kim Alvefur [Thu, 17 May 2012 19:25:41 +0000 (21:25 +0200)]
util.dataforms: Don't return invalid JIDs in jid-single.

12 years agoutil.dataforms: Fix validation of booleans.
Kim Alvefur [Thu, 17 May 2012 19:18:35 +0000 (21:18 +0200)]
util.dataforms: Fix validation of booleans.

12 years agoINSTALL: Update with changes from wiki.
Kim Alvefur [Thu, 17 May 2012 19:04:31 +0000 (21:04 +0200)]
INSTALL: Update with changes from wiki.

12 years agoutil.dataforms: Do field validation and normalization in field readers.
Kim Alvefur [Thu, 17 May 2012 19:01:44 +0000 (21:01 +0200)]
util.dataforms: Do field validation and normalization in field readers.

12 years agomodulemanager: Components should inherit mod_s2s from global modules_enabled too
Matthew Wild [Wed, 16 May 2012 19:30:53 +0000 (20:30 +0100)]
modulemanager: Components should inherit mod_s2s from global modules_enabled too

12 years agoRemove util.broadcast
Matthew Wild [Wed, 16 May 2012 19:17:07 +0000 (20:17 +0100)]
Remove util.broadcast

12 years agoprosodyctl: Add duplicate code for getting version of prosody
Kim Alvefur [Tue, 15 May 2012 18:15:52 +0000 (20:15 +0200)]
prosodyctl: Add duplicate code for getting version of prosody

12 years agomod_bosh: Set Content-Type to text/html for GET response (thanks Medics)
Matthew Wild [Tue, 15 May 2012 12:35:09 +0000 (13:35 +0100)]
mod_bosh: Set Content-Type to text/html for GET response (thanks Medics)

12 years agonet.http.parser: Keep the Host header no host is present in the URI
Kim Alvefur [Tue, 15 May 2012 12:00:57 +0000 (14:00 +0200)]
net.http.parser: Keep the Host header no host is present in the URI

12 years agoprosodyctl: Fix for generating certs with UTF-8
Kim Alvefur [Mon, 14 May 2012 16:04:32 +0000 (18:04 +0200)]
prosodyctl: Fix for generating certs with UTF-8

12 years agoprosody, stanza_router: Load stanza_router earlier. Put routing functions in the...
Kim Alvefur [Mon, 14 May 2012 15:58:51 +0000 (17:58 +0200)]
prosody, stanza_router: Load stanza_router earlier. Put routing functions in the global prosody table. Fixes module:send()

12 years agomuc.lib: room:set_historylength(): Condense code, and don't store length when equal...
Matthew Wild [Sun, 13 May 2012 21:58:25 +0000 (22:58 +0100)]
muc.lib: room:set_historylength(): Condense code, and don't store length when equal to default

12 years agoMUC: Fix check for history length update.
Waqas Hussain [Sun, 13 May 2012 21:42:42 +0000 (02:42 +0500)]
MUC: Fix check for history length update.

12 years agomuc.lib: Fix for traceback when no history length is set for the room
Matthew Wild [Sun, 13 May 2012 20:07:00 +0000 (21:07 +0100)]
muc.lib: Fix for traceback when no history length is set for the room

12 years agomod_s2s: Only try next target if the stream didn't open
Matthew Wild [Sun, 13 May 2012 15:03:05 +0000 (16:03 +0100)]
mod_s2s: Only try next target if the stream didn't open

12 years agoprosodyctl: Improve help messages for cert commands
Kim Alvefur [Sun, 13 May 2012 13:02:38 +0000 (15:02 +0200)]
prosodyctl: Improve help messages for cert commands

12 years agoutil.timer: Always pass the current time to timer callbacks.
Waqas Hussain [Sat, 12 May 2012 16:46:54 +0000 (21:46 +0500)]
util.timer: Always pass the current time to timer callbacks.

12 years agomod_iq: Use "jabber:client" when the stanza payload namespace is nil.
Waqas Hussain [Sat, 12 May 2012 16:39:30 +0000 (21:39 +0500)]
mod_iq: Use "jabber:client" when the stanza payload namespace is nil.

12 years agoMerge with Zash
Matthew Wild [Sat, 12 May 2012 02:36:15 +0000 (03:36 +0100)]
Merge with Zash

12 years agostanza_router: Fix variable name
Matthew Wild [Sat, 12 May 2012 02:24:06 +0000 (03:24 +0100)]
stanza_router: Fix variable name

12 years agonet.http.parser: Do full URL decoding and parsing (e.g. adds request.url.query when...
Matthew Wild [Sat, 12 May 2012 02:09:52 +0000 (03:09 +0100)]
net.http.parser: Do full URL decoding and parsing (e.g. adds request.url.query when present)

12 years agonet.http: Fix urlencode to not encode unreserved characters, so I can guiltlessly...
Matthew Wild [Sat, 12 May 2012 01:50:38 +0000 (02:50 +0100)]
net.http: Fix urlencode to not encode unreserved characters, so I can guiltlessly rant about people  who do.

12 years agostanza_router: Close stream for unhandled stanzas from unauthenticated connections...
Matthew Wild [Sat, 12 May 2012 00:47:53 +0000 (01:47 +0100)]
stanza_router: Close stream for unhandled stanzas from unauthenticated connections (we can't reply)

12 years agomod_http_files: Respond with a 301 redirect for directories to append a / (fixes...
Kim Alvefur [Sat, 12 May 2012 00:17:08 +0000 (02:17 +0200)]
mod_http_files: Respond with a 301 redirect for directories to append a / (fixes relative links)

12 years agostanza_router: Remove FIXME comment and close stream with not-authorized for s2s...
Matthew Wild [Fri, 11 May 2012 23:33:04 +0000 (00:33 +0100)]
stanza_router: Remove FIXME comment and close stream with not-authorized for s2s stanzas from unauthed domains

12 years agostanza_router: Catch s2s stanzas to hosts we don't serve earlier, and close with...
Matthew Wild [Fri, 11 May 2012 23:31:48 +0000 (00:31 +0100)]
stanza_router: Catch s2s stanzas to hosts we don't serve earlier, and close with host-unknown (thanks darkrain)

12 years agoportmanager: Fix missing variable declaration
Matthew Wild [Fri, 11 May 2012 22:20:58 +0000 (23:20 +0100)]
portmanager: Fix missing variable declaration

12 years agoadhoc.lib: Default actions to 'complete' (replacement for rev 52b6901cabb0)
Kim Alvefur [Fri, 11 May 2012 20:41:47 +0000 (21:41 +0100)]
adhoc.lib: Default actions to 'complete' (replacement for rev 52b6901cabb0)

12 years agoMerge with backout
Matthew Wild [Fri, 11 May 2012 20:35:08 +0000 (21:35 +0100)]
Merge with backout

12 years agoBacked out changeset 52b6901cabb0 (to be replaced)
Matthew Wild [Fri, 11 May 2012 20:35:02 +0000 (21:35 +0100)]
Backed out changeset 52b6901cabb0 (to be replaced)

12 years agoportmanager: Remove unused import of 'package'
Matthew Wild [Fri, 11 May 2012 20:27:42 +0000 (21:27 +0100)]
portmanager: Remove unused import of 'package'

12 years agoportmanager: Support for per-port SSL certificates
Matthew Wild [Fri, 11 May 2012 20:24:43 +0000 (21:24 +0100)]
portmanager: Support for per-port SSL certificates

12 years agocertmanager: Adjust error messages to be non-specific about 'host' (so we can specify...
Matthew Wild [Fri, 11 May 2012 19:24:15 +0000 (20:24 +0100)]
certmanager: Adjust error messages to be non-specific about 'host' (so we can specify a service name instead ffor SSL)

12 years agomoduleapi: Don't auto-reload self when already reloading (fixes reload of modules...
Matthew Wild [Fri, 11 May 2012 17:55:23 +0000 (18:55 +0100)]
moduleapi: Don't auto-reload self when already reloading (fixes reload of modules with cyclic dependencies)

12 years agomodulemanager: Set module.reloading = true when firing module-reloaded event
Matthew Wild [Fri, 11 May 2012 17:54:17 +0000 (18:54 +0100)]
modulemanager: Set module.reloading = true when firing module-reloaded event

12 years agomod_c2s: Another lurking string.format squashed.
Matthew Wild [Fri, 11 May 2012 13:57:29 +0000 (14:57 +0100)]
mod_c2s: Another lurking string.format squashed.

12 years agomod_dialback: Remove a remaining usage of string.format, ick.
Matthew Wild [Fri, 11 May 2012 13:24:05 +0000 (14:24 +0100)]
mod_dialback: Remove a remaining usage of string.format, ick.

12 years agomod_http_errors: Fix cyclic dependency - mod_http depends on us now, no need to depen...
Matthew Wild [Fri, 11 May 2012 01:36:26 +0000 (02:36 +0100)]
mod_http_errors: Fix cyclic dependency - mod_http depends on us now, no need to depend on it (-1 line) (thanks Maranda)

12 years agomod_s2s: Remove TODO comment for SASL/TLS on s2s (thanks Florob)
Matthew Wild [Fri, 11 May 2012 01:17:20 +0000 (02:17 +0100)]
mod_s2s: Remove TODO comment for SASL/TLS on s2s (thanks Florob)

12 years agomod_dialback: Final sweep to get nameprep + error handling in order (hopefully)
Matthew Wild [Fri, 11 May 2012 01:04:29 +0000 (02:04 +0100)]
mod_dialback: Final sweep to get nameprep + error handling in order (hopefully)

12 years agomod_dialback: Fix logic bug - we should have both a to and from at this point
Matthew Wild [Fri, 11 May 2012 00:54:36 +0000 (01:54 +0100)]
mod_dialback: Fix logic bug - we should have both a to and from at this point

12 years agoMerge with Maranda
Matthew Wild [Fri, 11 May 2012 00:53:32 +0000 (01:53 +0100)]
Merge with Maranda

12 years agoMerge with backout
Matthew Wild [Fri, 11 May 2012 00:46:41 +0000 (01:46 +0100)]
Merge with backout

12 years agoBacked out changeset 661752889535 - obsoleted by 878f75ccc4fb.
Matthew Wild [Fri, 11 May 2012 00:46:35 +0000 (01:46 +0100)]
Backed out changeset 661752889535 - obsoleted by 878f75ccc4fb.

12 years agoMerge with backout
Matthew Wild [Fri, 11 May 2012 00:45:36 +0000 (01:45 +0100)]
Merge with backout

12 years agoBacked out changeset 9f1fb34cd7f8 - obsoleted by 5ef05f32bc42.
Matthew Wild [Fri, 11 May 2012 00:39:52 +0000 (01:39 +0100)]
Backed out changeset 9f1fb34cd7f8 - obsoleted by 5ef05f32bc42.

12 years agoMerge with backout
Matthew Wild [Fri, 11 May 2012 00:32:46 +0000 (01:32 +0100)]
Merge with backout

12 years agoBacked out changeset 751510cd558d - obsoleted by 5ef05f32bc42.
Matthew Wild [Fri, 11 May 2012 00:29:30 +0000 (01:29 +0100)]
Backed out changeset 751510cd558d - obsoleted by 5ef05f32bc42.

12 years agomod_s2s, mod_auth_anonymous, hostmanager: Remove disallow_s2s flag, deprecate the...
Matthew Wild [Thu, 10 May 2012 23:56:18 +0000 (00:56 +0100)]
mod_s2s, mod_auth_anonymous, hostmanager: Remove disallow_s2s flag, deprecate the config option of the same name (disable mod_s2s instead), and add 'allow_anonymous_s2s' to separately control s2s for anonymous users

12 years agomuc.lib: return feature-not-implemented when a foregoing discovery node is specified...
Marco Cirillo [Thu, 10 May 2012 23:37:36 +0000 (23:37 +0000)]
muc.lib: return feature-not-implemented when a foregoing discovery node is specified in a disco#info request.

12 years agoMerge with Zash
Matthew Wild [Thu, 10 May 2012 22:10:56 +0000 (23:10 +0100)]
Merge with Zash

12 years agomod_s2s, s2smanager, mod_dialback: Move addition of session.send() on s2sin to after...
Matthew Wild [Thu, 10 May 2012 21:59:01 +0000 (22:59 +0100)]
mod_s2s, s2smanager, mod_dialback: Move addition of session.send() on s2sin to after they are authenticated (thus from mod_s2s to s2smanager). Update mod_dialback to fire route/remote directly, as session.send() is no longer available for s2sin_unauthed. Fixes #291.

12 years agos2smanager, mod_s2s: Move checking DNS timeout option to mod_s2s
Kim Alvefur [Thu, 10 May 2012 21:05:03 +0000 (23:05 +0200)]
s2smanager, mod_s2s: Move checking DNS timeout option to mod_s2s

12 years agos2smanager: Clean up unused imports.
Kim Alvefur [Thu, 10 May 2012 21:01:10 +0000 (23:01 +0200)]
s2smanager: Clean up unused imports.

12 years agoutil.rfc3484: Don't pollute the global scope.
Kim Alvefur [Thu, 10 May 2012 21:00:45 +0000 (23:00 +0200)]
util.rfc3484: Don't pollute the global scope.

12 years agomod_auth_anonymous: add disallow_s2s to the host object if s2s communication is disal...
Marco Cirillo [Thu, 10 May 2012 12:54:37 +0000 (12:54 +0000)]
mod_auth_anonymous: add disallow_s2s to the host object if s2s communication is disallowed.

12 years agoutil.hashes: Add sha224, sha384, sha512
Kim Alvefur [Thu, 10 May 2012 03:57:24 +0000 (05:57 +0200)]
util.hashes: Add sha224, sha384, sha512

12 years agomod_dialback: make change a bit more wide, encompass to and from and reject with...
Marco Cirillo [Wed, 9 May 2012 23:09:06 +0000 (23:09 +0000)]
mod_dialback: make change a bit more wide, encompass to and from and reject with proper addressing when neither are there.

12 years agomod_dialback: add better safe then sorry nameprepping to the from attribute.
Marco Cirillo [Wed, 9 May 2012 11:25:22 +0000 (11:25 +0000)]
mod_dialback: add better safe then sorry nameprepping to the from attribute.

12 years agomod_dialback: COMPAT reset session.send function for servers (e.g. ejabberd) which...
Marco Cirillo [Wed, 9 May 2012 02:56:22 +0000 (02:56 +0000)]
mod_dialback: COMPAT reset session.send function for servers (e.g. ejabberd) which don't include a from attr when opening the stream.

12 years agoutil.hashes: Use defined hash function output lengths.
Kim Alvefur [Tue, 8 May 2012 23:26:56 +0000 (01:26 +0200)]
util.hashes: Use defined hash function output lengths.

12 years agoprosodyctl: Show an error if the user doesn't supply a hostname to the certificate...
Kim Alvefur [Tue, 8 May 2012 23:11:27 +0000 (01:11 +0200)]
prosodyctl: Show an error if the user doesn't supply a hostname to the certificate commands

12 years agoprosodyctl: Replace hack with lfs for checking if a file exists
Kim Alvefur [Tue, 8 May 2012 23:02:00 +0000 (01:02 +0200)]
prosodyctl: Replace hack with lfs for checking if a file exists

12 years agoutil.x509: Remove logic for generating certificate configs
Kim Alvefur [Tue, 8 May 2012 22:34:24 +0000 (00:34 +0200)]
util.x509: Remove logic for generating certificate configs

12 years agoprosodyctl: Use util.openssl in certificate helpers. Improve feedback
Kim Alvefur [Tue, 8 May 2012 22:33:55 +0000 (00:33 +0200)]
prosodyctl: Use util.openssl in certificate helpers. Improve feedback

12 years agoutil.openssl: Add wrapper for the openssl cli tool and move certificate config logic...
Kim Alvefur [Tue, 8 May 2012 22:12:53 +0000 (00:12 +0200)]
util.openssl: Add wrapper for the openssl cli tool and move certificate config logic from util.x509 into it.

12 years agomod_auth_anonymous: Block s2s when enabled on a host (and disallow_s2s ~= false)
Matthew Wild [Fri, 4 May 2012 01:28:10 +0000 (02:28 +0100)]
mod_auth_anonymous: Block s2s when enabled on a host (and disallow_s2s ~= false)

12 years agomod_s2s: Cache to_host and from_host in local variables, and use these instead of...
Matthew Wild [Fri, 4 May 2012 01:27:26 +0000 (02:27 +0100)]
mod_s2s: Cache to_host and from_host in local variables, and use these instead of repeated lookups

12 years agomod_s2s: Add session.send() only to incoming streams, and fire the route/remote event...
Matthew Wild [Fri, 4 May 2012 01:22:26 +0000 (02:22 +0100)]
mod_s2s: Add session.send() only to incoming streams, and fire the route/remote event on the host (not global anymore)

12 years agomod_s2s: Become a shared module (yay)
Matthew Wild [Fri, 4 May 2012 00:50:17 +0000 (01:50 +0100)]
mod_s2s: Become a shared module (yay)

12 years agostanza_router: Fire route/remote per-host
Matthew Wild [Fri, 4 May 2012 00:49:13 +0000 (01:49 +0100)]
stanza_router: Fire route/remote per-host

12 years agostanza_router: Allow route/remote handlers to return false to block a stanza
Matthew Wild [Fri, 4 May 2012 00:46:54 +0000 (01:46 +0100)]
stanza_router: Allow route/remote handlers to return false to block a stanza

12 years agoprosodyctl: Fix import of util.iterators
Kim Alvefur [Thu, 3 May 2012 23:13:33 +0000 (01:13 +0200)]
prosodyctl: Fix import of util.iterators

12 years agoRename plugins/s2s/ to plugins/mod_s2s/
Matthew Wild [Thu, 3 May 2012 23:05:15 +0000 (00:05 +0100)]
Rename plugins/s2s/ to plugins/mod_s2s/

12 years agosessionmanager: Remove max_resources config option and check, incorrect anyway (thank...
Matthew Wild [Thu, 3 May 2012 22:18:56 +0000 (23:18 +0100)]
sessionmanager: Remove max_resources config option and check, incorrect anyway (thanks Zash)

12 years agoutil.timer: Remove unnecessary require calls, fixes a traceback (thanks nulani)
Matthew Wild [Thu, 3 May 2012 17:59:06 +0000 (18:59 +0100)]
util.timer: Remove unnecessary require calls, fixes a traceback (thanks nulani)

12 years agonet.server: server_select != server_event (thanks Nulani, Florob)
Matthew Wild [Thu, 3 May 2012 17:53:36 +0000 (18:53 +0100)]
net.server: server_select != server_event (thanks Nulani, Florob)

12 years agoMerge with Zash
Matthew Wild [Thu, 3 May 2012 15:52:04 +0000 (16:52 +0100)]
Merge with Zash