prosody.git
8 years agonet.server_event: Collect entire one line function on one line
Kim Alvefur [Wed, 4 May 2016 13:20:33 +0000 (15:20 +0200)]
net.server_event: Collect entire one line function on one line

8 years agoMerge 0.9->0.10
Kim Alvefur [Tue, 19 Apr 2016 17:00:19 +0000 (19:00 +0200)]
Merge 0.9->0.10

8 years agonet.server_event: Check the buffer *length*, not the buffer itself (Fixes 100% cpu...
Kim Alvefur [Tue, 19 Apr 2016 16:58:30 +0000 (18:58 +0200)]
net.server_event: Check the buffer *length*, not the buffer itself (Fixes 100% cpu usage introduced in 65abd9d7bf88)

8 years agoMerge 0.9->0.10
Kim Alvefur [Tue, 19 Apr 2016 16:23:02 +0000 (18:23 +0200)]
Merge 0.9->0.10

8 years agonet.server_event: Return the correct value as timeout
Kim Alvefur [Tue, 19 Apr 2016 16:20:39 +0000 (18:20 +0200)]
net.server_event: Return the correct value as timeout

8 years agonet.server_event: Fix traceback if event re-added during starttls
Kim Alvefur [Tue, 19 Apr 2016 16:18:57 +0000 (18:18 +0200)]
net.server_event: Fix traceback if event re-added during starttls

8 years agomod_bosh: Don't decrement rid twice (thanks av6)
Kim Alvefur [Tue, 19 Apr 2016 15:44:04 +0000 (17:44 +0200)]
mod_bosh: Don't decrement rid twice (thanks av6)

8 years agoMerge 0.9->0.10
Kim Alvefur [Tue, 19 Apr 2016 15:30:30 +0000 (17:30 +0200)]
Merge 0.9->0.10

8 years agonet.server_event: Re-add write event if writebuffer is non-empty after write (eg...
Kim Alvefur [Tue, 19 Apr 2016 15:24:00 +0000 (17:24 +0200)]
net.server_event: Re-add write event if writebuffer is non-empty after write (eg due to writes from ondrain callback) (fixes #661)

8 years agoMUC: Accept missing form as "instant room" request (fixes #377)
Kim Alvefur [Tue, 19 Apr 2016 15:20:39 +0000 (17:20 +0200)]
MUC: Accept missing form as "instant room" request (fixes #377)

8 years agomod_bosh: Reject fractional 'wait' (See #343)
Kim Alvefur [Tue, 19 Apr 2016 10:33:58 +0000 (12:33 +0200)]
mod_bosh: Reject fractional 'wait' (See #343)

8 years agomod_bosh: Return a proper BOSH error response from XML parse error callback (see...
Kim Alvefur [Tue, 19 Apr 2016 10:19:15 +0000 (12:19 +0200)]
mod_bosh: Return a proper BOSH error response from XML parse error callback (see #343)

8 years agomod_bosh: Validate that 'sid' and 'wait' have sane values (fixes #475, also see ...
Kim Alvefur [Tue, 19 Apr 2016 10:18:19 +0000 (12:18 +0200)]
mod_bosh: Validate that 'sid' and 'wait' have sane values (fixes #475, also see #343)

8 years agomod_bosh: Validate 'to' host (see #343)
Kim Alvefur [Tue, 19 Apr 2016 10:17:00 +0000 (12:17 +0200)]
mod_bosh: Validate 'to' host (see #343)

8 years agomod_bosh: Return a proper BOSH error response instead of deprecated(?) status code...
Kim Alvefur [Tue, 19 Apr 2016 10:16:17 +0000 (12:16 +0200)]
mod_bosh: Return a proper BOSH error response instead of deprecated(?) status code (See #343)

8 years agomod_bosh: Log error returned from stream:feed()
Kim Alvefur [Tue, 19 Apr 2016 10:15:20 +0000 (12:15 +0200)]
mod_bosh: Log error returned from stream:feed()

8 years agomod_bosh: Return if a response has been sent already (See #343)
Kim Alvefur [Tue, 19 Apr 2016 10:14:07 +0000 (12:14 +0200)]
mod_bosh: Return if a response has been sent already (See #343)

8 years agomod_bosh: Remove unused import
Kim Alvefur [Tue, 19 Apr 2016 10:13:03 +0000 (12:13 +0200)]
mod_bosh: Remove unused import

8 years agoutil.iterators: Add iterator wrapper that works like select(n, ...) applied to origin...
Kim Alvefur [Fri, 15 Apr 2016 11:20:31 +0000 (13:20 +0200)]
util.iterators: Add iterator wrapper that works like select(n, ...) applied to original iterator

8 years agoutil.cache: Add method for iterating over values
Kim Alvefur [Fri, 15 Apr 2016 11:19:20 +0000 (13:19 +0200)]
util.cache: Add method for iterating over values

8 years agoutil.iterators: Normalize indentation
Kim Alvefur [Wed, 13 Apr 2016 18:00:41 +0000 (20:00 +0200)]
util.iterators: Normalize indentation

8 years agomod_compression: Remove and replace with placeholder that logs an error
Matthew Wild [Sat, 9 Apr 2016 18:21:05 +0000 (19:21 +0100)]
mod_compression: Remove and replace with placeholder that logs an error

8 years agomod_presence: Fix variable name
Kim Alvefur [Fri, 8 Apr 2016 15:14:58 +0000 (17:14 +0200)]
mod_presence: Fix variable name

8 years agomod_presence: Construct a 'from' JID when roster items are removed outside of a session
Kim Alvefur [Fri, 8 Apr 2016 14:35:23 +0000 (16:35 +0200)]
mod_presence: Construct a 'from' JID when roster items are removed outside of a session

8 years agomoduleapi: Allow an origin session to be passed to module:send()
Kim Alvefur [Wed, 6 Apr 2016 19:29:30 +0000 (21:29 +0200)]
moduleapi: Allow an origin session to be passed to module:send()

8 years agomod_websocket: Fix read timeout handler (thanks mt)
Kim Alvefur [Wed, 6 Apr 2016 12:44:51 +0000 (14:44 +0200)]
mod_websocket: Fix read timeout handler (thanks mt)

8 years agomod_c2s: Just destroy the session when it has no connection (see #641)
Kim Alvefur [Sun, 3 Apr 2016 13:18:21 +0000 (15:18 +0200)]
mod_c2s: Just destroy the session when it has no connection (see #641)

8 years agomod_http_files: Preserve a trailing / in paths (fixes #639)
Kim Alvefur [Thu, 3 Mar 2016 14:31:46 +0000 (15:31 +0100)]
mod_http_files: Preserve a trailing / in paths (fixes #639)

8 years agomod_http_files: Don't prepend / to path twice, sanitize path does this already
Kim Alvefur [Thu, 3 Mar 2016 14:30:00 +0000 (15:30 +0100)]
mod_http_files: Don't prepend / to path twice, sanitize path does this already

8 years agomod_http_files: Fix traceback when serving a non-wildcard path (fixes #611)
Kim Alvefur [Thu, 3 Mar 2016 14:28:07 +0000 (15:28 +0100)]
mod_http_files: Fix traceback when serving a non-wildcard path (fixes #611)

8 years agonet.server_event: Return true from conn:resume() to indicate success
Kim Alvefur [Wed, 2 Mar 2016 15:30:46 +0000 (16:30 +0100)]
net.server_event: Return true from conn:resume() to indicate success

8 years agonet.server_event: Prevent resuming connections without readcallback, eg closed connec...
Kim Alvefur [Wed, 2 Mar 2016 15:30:05 +0000 (16:30 +0100)]
net.server_event: Prevent resuming connections without readcallback, eg closed connections (fixes #590)

8 years agomod_c2s: Remove connection object from session object when connection disconnected...
Kim Alvefur [Wed, 2 Mar 2016 15:28:11 +0000 (16:28 +0100)]
mod_c2s: Remove connection object from session object when connection disconnected to prevent accidental use (see #590)

8 years agoutil.datamanager: Unreference file handle after closing it to prevent trying to close...
Kim Alvefur [Thu, 25 Feb 2016 21:36:42 +0000 (22:36 +0100)]
util.datamanager: Unreference file handle after closing it to prevent trying to close it again (fixes #632)

8 years agoAdded tag 0.9.10 for changeset 352270bc0439
Matthew Wild [Wed, 27 Jan 2016 13:05:58 +0000 (13:05 +0000)]
Added tag 0.9.10 for changeset 352270bc0439

8 years agoMerge
Kim Alvefur [Tue, 26 Jan 2016 23:06:30 +0000 (00:06 +0100)]
Merge

8 years agomod_c2s, mod_s2s: Lower priority of session shutdown to negative, so that plugins...
Kim Alvefur [Mon, 25 Jan 2016 23:28:07 +0000 (00:28 +0100)]
mod_c2s, mod_s2s: Lower priority of session shutdown to negative, so that plugins hooking at the default priority run first (fixes #601)

8 years agoserver_select: Add logging of when servers are paused and resumed
Kim Alvefur [Fri, 22 Jan 2016 01:00:43 +0000 (02:00 +0100)]
server_select: Add logging of when servers are paused and resumed

8 years agoserver_select: Pause and mark server as full if accepting a client fails (fixes ...
Kim Alvefur [Fri, 22 Jan 2016 01:00:27 +0000 (02:00 +0100)]
server_select: Pause and mark server as full if accepting a client fails (fixes #597)

8 years agoserver_select: Retry accepting clients from full servers after 10s (matches libevent...
Kim Alvefur [Fri, 22 Jan 2016 00:59:25 +0000 (01:59 +0100)]
server_select: Retry accepting clients from full servers after 10s (matches libevent behaviour)

8 years agoserver_select: Keep track of which server listeners are full
Kim Alvefur [Fri, 22 Jan 2016 00:58:39 +0000 (01:58 +0100)]
server_select: Keep track of which server listeners are full

8 years agonet.dns: Remember query only after it was sent, in case it was not (fixes #598)
Kim Alvefur [Thu, 21 Jan 2016 21:26:46 +0000 (22:26 +0100)]
net.dns: Remember query only after it was sent, in case it was not (fixes #598)

8 years agoBackout 63f5870f9afe, no longer needed since Windows is currently unsupported
Kim Alvefur [Thu, 21 Jan 2016 21:21:19 +0000 (22:21 +0100)]
Backout 63f5870f9afe, no longer needed since Windows is currently unsupported

8 years agomod_dialback: Follow XEP-0185 and use HMAC
Kim Alvefur [Tue, 19 Jan 2016 20:31:02 +0000 (21:31 +0100)]
mod_dialback: Follow XEP-0185 and use HMAC

8 years agocore: Increase default read size to "all of it", in practice 8K (size of LuaSockets...
Kim Alvefur [Sun, 10 Jan 2016 22:25:00 +0000 (23:25 +0100)]
core: Increase default read size to "all of it", in practice 8K (size of LuaSockets buffer)

8 years agoutil.uuid: Open /dev/urandom read-only, make seed() a noop
Kim Alvefur [Sun, 10 Jan 2016 22:21:34 +0000 (23:21 +0100)]
util.uuid: Open /dev/urandom read-only, make seed() a noop

8 years agoAdded tag 0.9.9 for changeset 7ec52755622f
Matthew Wild [Fri, 8 Jan 2016 13:01:32 +0000 (13:01 +0000)]
Added tag 0.9.9 for changeset 7ec52755622f

8 years agoBackout 88d54bec26b7 prior to release, as it certainly requires more testing
Matthew Wild [Fri, 8 Jan 2016 13:01:27 +0000 (13:01 +0000)]
Backout 88d54bec26b7 prior to release, as it certainly requires more testing

8 years agomod_http_files: Santize the path relative to our base URL before translating it to...
Matthew Wild [Thu, 7 Jan 2016 15:37:47 +0000 (15:37 +0000)]
mod_http_files: Santize the path relative to our base URL before translating it to a filesystem path, fixes a relative path traversal vulnerability

8 years agoutil.uuid: Use /dev/urandom
Kim Alvefur [Wed, 6 Jan 2016 01:46:47 +0000 (02:46 +0100)]
util.uuid: Use /dev/urandom

8 years agonet.dns: Allow a zone id in resolv.conf (eg like %eth0)
Kim Alvefur [Mon, 4 Jan 2016 14:46:06 +0000 (15:46 +0100)]
net.dns: Allow a zone id in resolv.conf (eg like %eth0)

8 years agoutil.ip: Support zone id syntax in IPv6 addresses
Kim Alvefur [Mon, 4 Jan 2016 16:47:40 +0000 (17:47 +0100)]
util.ip: Support zone id syntax in IPv6 addresses

10 years agoserver_event: addclient: wrapclient already calls startconnection for us [backported...
daurnimator [Wed, 18 Dec 2013 23:11:47 +0000 (18:11 -0500)]
server_event: addclient: wrapclient already calls startconnection for us [backported from trunk]

8 years agoserver_event: Split long list of assignments into multiple lines for readability
Kim Alvefur [Tue, 5 Apr 2016 18:41:50 +0000 (20:41 +0200)]
server_event: Split long list of assignments into multiple lines for readability

8 years agoserver_event: Fix indentation (again)
Kim Alvefur [Tue, 5 Apr 2016 18:39:36 +0000 (20:39 +0200)]
server_event: Fix indentation (again)

8 years agomod_roster: Fire event for pending items for good measure
Kim Alvefur [Mon, 4 Apr 2016 19:48:42 +0000 (21:48 +0200)]
mod_roster: Fire event for pending items for good measure

8 years agomod_roster: Handle roster item removal with event on user deletion
Kim Alvefur [Mon, 4 Apr 2016 15:18:27 +0000 (17:18 +0200)]
mod_roster: Handle roster item removal with event on user deletion

8 years agomod_presence: Send unavailable presence when roster items are removed (fixes #331)
Kim Alvefur [Mon, 4 Apr 2016 15:15:47 +0000 (17:15 +0200)]
mod_presence: Send unavailable presence when roster items are removed (fixes #331)

8 years agomod_presence, mod_roster: Move responsibility for sending presence on roster removal...
Kim Alvefur [Mon, 4 Apr 2016 15:15:10 +0000 (17:15 +0200)]
mod_presence, mod_roster: Move responsibility for sending presence on roster removal to mod_presence

8 years agoMerge 0.9->0.10
Kim Alvefur [Sun, 3 Apr 2016 13:52:40 +0000 (15:52 +0200)]
Merge 0.9->0.10

8 years agomod_bosh: Skip sending stanzas removed out by filters (fixes #657)
Kim Alvefur [Fri, 1 Apr 2016 16:56:26 +0000 (18:56 +0200)]
mod_bosh: Skip sending stanzas removed out by filters (fixes #657)

8 years agostoragemanager: Capitalize log message
Kim Alvefur [Fri, 1 Apr 2016 13:56:12 +0000 (15:56 +0200)]
storagemanager: Capitalize log message

9 years agonet.server_select: Remove do-nothing os_difftime calls [backported from trunk]
daurnimator [Mon, 19 Jan 2015 19:01:11 +0000 (14:01 -0500)]
net.server_select: Remove do-nothing os_difftime calls [backported from trunk]

8 years agonet.dns: Import unpack() in forward-compatible way (Fixes compat with Lua5.2+)
Kim Alvefur [Mon, 28 Mar 2016 17:56:12 +0000 (19:56 +0200)]
net.dns: Import unpack() in forward-compatible way (Fixes compat with Lua5.2+)

8 years agoutil.jid: Import select() into local (fixes traceback, tests on Lua 5.2)
Kim Alvefur [Mon, 28 Mar 2016 11:27:42 +0000 (13:27 +0200)]
util.jid: Import select() into local (fixes traceback, tests on Lua 5.2)

8 years agocertmanager: Explicitly tonumber() version number segments before doing arithmetic...
Matthew Wild [Sat, 26 Mar 2016 19:55:08 +0000 (19:55 +0000)]
certmanager: Explicitly tonumber() version number segments before doing arithmetic and avoid relying on implicit coercion (thanks David Favro)

8 years agoutil.sql: Log errors in transaction to error level with traceback but return only...
Kim Alvefur [Fri, 25 Mar 2016 15:09:34 +0000 (16:09 +0100)]
util.sql: Log errors in transaction to error level with traceback but return only error message (fixes #464)

8 years agomod_websocket: Send a ping on read timeout
Kim Alvefur [Wed, 23 Mar 2016 22:21:03 +0000 (23:21 +0100)]
mod_websocket: Send a ping on read timeout

8 years agomod_websocket: Remove warning about unsolicited pong frames "MAY be sent unsolicited...
Kim Alvefur [Wed, 23 Mar 2016 13:31:35 +0000 (14:31 +0100)]
mod_websocket: Remove warning about unsolicited pong frames "MAY be sent unsolicited" per RFC 6455 (thanks mt)

8 years agoutil.sql: Charset should be innocent until proven guilty (initialize charset_ok to...
Matthew Wild [Wed, 23 Mar 2016 12:17:28 +0000 (12:17 +0000)]
util.sql: Charset should be innocent until proven guilty (initialize charset_ok to true), fixes bug introduced in 187ba2e9c012

8 years agoprosodyctl: Only use host part of JIDs eg components that have node parts (thanks...
Kim Alvefur [Tue, 22 Mar 2016 13:42:55 +0000 (14:42 +0100)]
prosodyctl: Only use host part of JIDs eg components that have node parts (thanks suzyo)

8 years agoutil.iterators: Fix use of incorrect variable accidentally introduced in a9ef93bc81d9
Matthew Wild [Mon, 21 Mar 2016 21:04:14 +0000 (21:04 +0000)]
util.iterators: Fix use of incorrect variable accidentally introduced in a9ef93bc81d9

8 years agoutil.sql: Catch errors from LuaDBI connect (Fixes #568)
Kim Alvefur [Mon, 21 Mar 2016 08:50:52 +0000 (09:50 +0100)]
util.sql: Catch errors from LuaDBI connect (Fixes #568)

8 years agomod_storage_sql: Make sure all serialization errors are propagated
Kim Alvefur [Mon, 21 Mar 2016 08:33:12 +0000 (09:33 +0100)]
mod_storage_sql: Make sure all serialization errors are propagated

8 years agomodulemanager: Silence log message about attempts to load already loaded modules...
Kim Alvefur [Sat, 19 Mar 2016 15:35:43 +0000 (16:35 +0100)]
modulemanager: Silence log message about attempts to load already loaded modules for shared modules

8 years agomod_component: Some cleanup [luacheck]
Matthew Wild [Fri, 18 Mar 2016 14:03:14 +0000 (14:03 +0000)]
mod_component: Some cleanup [luacheck]

8 years agomod_component: Fire event when component disconnects
Matthew Wild [Fri, 18 Mar 2016 13:58:55 +0000 (13:58 +0000)]
mod_component: Fire event when component disconnects

8 years agoMerge
Kim Alvefur [Fri, 18 Mar 2016 10:55:40 +0000 (11:55 +0100)]
Merge

8 years agomod_saslauth: Disable DIGEST-MD5 by default (closes #515)
Kim Alvefur [Fri, 18 Mar 2016 10:51:58 +0000 (11:51 +0100)]
mod_saslauth: Disable DIGEST-MD5 by default (closes #515)

8 years agoprosody, prosodyctl: Allow setting CFG_* variables via Lua interpreter before loading...
Matthew Wild [Fri, 18 Mar 2016 10:24:46 +0000 (10:24 +0000)]
prosody, prosodyctl: Allow setting CFG_* variables via Lua interpreter before loading Prosody. Fixes #308.

8 years agoutil.jid+tests: Add simple helpers... node(), host() and resource() for extracting...
Matthew Wild [Thu, 17 Mar 2016 23:15:08 +0000 (23:15 +0000)]
util.jid+tests: Add simple helpers... node(), host() and resource() for extracting specific parts of a JID

8 years agomod_websocket: Make sure stanza xmlns filter runs late in the chain
Kim Alvefur [Thu, 17 Mar 2016 23:08:33 +0000 (00:08 +0100)]
mod_websocket: Make sure stanza xmlns filter runs late in the chain

8 years agomod_register: Make sure only an on_evict function or nil is passed to util.cache
Kim Alvefur [Thu, 17 Mar 2016 21:25:56 +0000 (22:25 +0100)]
mod_register: Make sure only an on_evict function or nil is passed to util.cache

8 years agotests: util.cache: Tests for different return values of on_evict
Matthew Wild [Thu, 17 Mar 2016 19:14:58 +0000 (19:14 +0000)]
tests: util.cache: Tests for different return values of on_evict

8 years agoutil.cache: Change behaviour of on_evict (and tests). Now accepts false instead of...
Matthew Wild [Thu, 17 Mar 2016 19:08:42 +0000 (19:08 +0000)]
util.cache: Change behaviour of on_evict (and tests). Now accepts false instead of a function (never evict), or on_evict can return false to prevent eviction.

8 years agoutil.cache: Add head() and tail() methods (and tests)
Matthew Wild [Thu, 17 Mar 2016 19:07:40 +0000 (19:07 +0000)]
util.cache: Add head() and tail() methods (and tests)

8 years agoCHANGES: Remove mention of async
Kim Alvefur [Thu, 17 Mar 2016 17:08:16 +0000 (18:08 +0100)]
CHANGES: Remove mention of async

8 years agoutil.async: Remove to prevent blocking a stable release
Kim Alvefur [Thu, 17 Mar 2016 17:00:35 +0000 (18:00 +0100)]
util.async: Remove to prevent blocking a stable release

8 years agomod_c2s: Remove use of util.async
Kim Alvefur [Thu, 17 Mar 2016 11:47:24 +0000 (12:47 +0100)]
mod_c2s: Remove use of util.async

8 years agoBacked out BOSH use of util.async (changeset f0687c313cf1)
Kim Alvefur [Thu, 17 Mar 2016 11:46:52 +0000 (12:46 +0100)]
Backed out BOSH use of util.async (changeset f0687c313cf1)

8 years agomod_presence: Fix partial rename
Kim Alvefur [Mon, 14 Mar 2016 17:27:16 +0000 (18:27 +0100)]
mod_presence: Fix partial rename

8 years agomod_presence: Move function for selecting "top resources" into a new util.presence
Kim Alvefur [Mon, 14 Mar 2016 16:26:27 +0000 (17:26 +0100)]
mod_presence: Move function for selecting "top resources" into a new util.presence

8 years agomod_s2s: Include name of remote server when it's missing the stream ID (thanks Ge0rG)
Kim Alvefur [Mon, 14 Mar 2016 12:27:02 +0000 (13:27 +0100)]
mod_s2s: Include name of remote server when it's missing the stream ID (thanks Ge0rG)

8 years agoutil.sql: Remove unused arguments [luacheck]
Kim Alvefur [Sun, 13 Mar 2016 17:35:00 +0000 (18:35 +0100)]
util.sql: Remove unused arguments [luacheck]

8 years agoutil.sql: Don't break out of result retreival loops
Kim Alvefur [Sun, 13 Mar 2016 17:31:53 +0000 (18:31 +0100)]
util.sql: Don't break out of result retreival loops

8 years agomod_storage_sql: Allow loops over results to end on their own
Kim Alvefur [Sun, 13 Mar 2016 16:43:33 +0000 (17:43 +0100)]
mod_storage_sql: Allow loops over results to end on their own

8 years agomod_storage_sql: Add LIMIT clause to queries where only a single row is expected
Kim Alvefur [Sun, 13 Mar 2016 16:42:22 +0000 (17:42 +0100)]
mod_storage_sql: Add LIMIT clause to queries where only a single row is expected

8 years agoutil.sql: Move per-driver (currenly only PostgreSQL) query transform into its own...
Kim Alvefur [Sun, 13 Mar 2016 16:38:49 +0000 (17:38 +0100)]
util.sql: Move per-driver (currenly only PostgreSQL) query transform into its own method

8 years agorostermanager: Remove FIXME, per XMPP Core 8.1.1.1, we do not need to set the 'to...
Kim Alvefur [Sat, 12 Mar 2016 17:13:24 +0000 (18:13 +0100)]
rostermanager: Remove FIXME, per XMPP Core 8.1.1.1, we do not need to set the 'to' attribute

8 years agomod_watchregistrations: Use type-specific config API for 'registration_notification'
Kim Alvefur [Fri, 11 Mar 2016 12:37:18 +0000 (13:37 +0100)]
mod_watchregistrations: Use type-specific config API for 'registration_notification'