prosody.git
8 years agostoragemanager: Fix saving data in map shim when no prior data exists
Kim Alvefur [Sun, 6 Mar 2016 17:51:11 +0000 (18:51 +0100)]
storagemanager: Fix saving data in map shim when no prior data exists

8 years agotests: Add basic tests for util.xml and util.xmppstream
Matthew Wild [Sat, 5 Mar 2016 23:42:01 +0000 (23:42 +0000)]
tests: Add basic tests for util.xml and util.xmppstream

8 years agotests: Add extra tests for util.json
Matthew Wild [Sat, 5 Mar 2016 20:48:20 +0000 (20:48 +0000)]
tests: Add extra tests for util.json

8 years agoutil.json: Fix encoding of json.null (bug introduced in bf1f09a5bcf7)
Matthew Wild [Fri, 4 Mar 2016 22:27:04 +0000 (22:27 +0000)]
util.json: Fix encoding of json.null (bug introduced in bf1f09a5bcf7)

8 years agoMakefile: Reduce verbosity of 'make test' so it only shows test failures
Matthew Wild [Fri, 4 Mar 2016 22:17:38 +0000 (22:17 +0000)]
Makefile: Reduce verbosity of 'make test' so it only shows test failures

8 years agoAdd tests for util.json
Matthew Wild [Fri, 4 Mar 2016 22:17:16 +0000 (22:17 +0000)]
Add tests for util.json

8 years agoMerge 0.9->0.10
Kim Alvefur [Thu, 3 Mar 2016 15:05:34 +0000 (16:05 +0100)]
Merge 0.9->0.10

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 agomod_welcome: Pass default text to config API as default value
Kim Alvefur [Wed, 2 Mar 2016 15:43:42 +0000 (16:43 +0100)]
mod_welcome: Pass default text to config API as default value

8 years agomod_welcome: Use type-specific config API
Kim Alvefur [Wed, 2 Mar 2016 15:42:59 +0000 (16:42 +0100)]
mod_welcome: Use type-specific config API

8 years agoMerge 0.9->0.10
Kim Alvefur [Wed, 2 Mar 2016 15:32:37 +0000 (16:32 +0100)]
Merge 0.9->0.10

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.sasl.scram: Rename variable in places missed in 65e36b81d56a (thanks mt)
Kim Alvefur [Sun, 28 Feb 2016 19:01:13 +0000 (20:01 +0100)]
util.sasl.scram: Rename variable in places missed in 65e36b81d56a (thanks mt)

8 years agoutil.sasl.scram: Remove unused initial value [luacheck]
Kim Alvefur [Sun, 28 Feb 2016 18:26:45 +0000 (19:26 +0100)]
util.sasl.scram: Remove unused initial value [luacheck]

8 years agoutil.sasl.scram: Rename variable to avoid name clash [luacheck]
Kim Alvefur [Sun, 28 Feb 2016 18:26:14 +0000 (19:26 +0100)]
util.sasl.scram: Rename variable to avoid name clash [luacheck]

8 years agoutil.sasl.anonymous: Remove unused locals [luacheck]
Kim Alvefur [Sun, 28 Feb 2016 18:25:39 +0000 (19:25 +0100)]
util.sasl.anonymous: Remove unused locals [luacheck]

8 years agoprosodyctl: One month is 31 days, no 13 (thanks av6)
Kim Alvefur [Sun, 28 Feb 2016 17:47:11 +0000 (18:47 +0100)]
prosodyctl: One month is 31 days, no 13 (thanks av6)

8 years agoprosodyctl: Fix typo (thanks av6)
Kim Alvefur [Sun, 28 Feb 2016 17:45:27 +0000 (18:45 +0100)]
prosodyctl: Fix typo (thanks av6)

8 years agoprosodyctl: check certs: Warn about certificate expiry in the near future
Kim Alvefur [Sun, 28 Feb 2016 17:24:12 +0000 (18:24 +0100)]
prosodyctl: check certs: Warn about certificate expiry in the near future

8 years agoprosodyctl: check certs: Update messages to account for 'ssl' option maybe not existing
Kim Alvefur [Sun, 28 Feb 2016 17:23:24 +0000 (18:23 +0100)]
prosodyctl: check certs: Update messages to account for 'ssl' option maybe not existing

8 years agoprosodyctl: check certs: Use certmanager to get the final ssl config in order to...
Kim Alvefur [Sun, 28 Feb 2016 17:22:23 +0000 (18:22 +0100)]
prosodyctl: check certs: Use certmanager to get the final ssl config in order to support the new certificate(s) config option

8 years agoutil.termcolours: Rename loop variable [luacheck]
Kim Alvefur [Sun, 28 Feb 2016 14:03:16 +0000 (15:03 +0100)]
util.termcolours: Rename loop variable [luacheck]

8 years agoutil.termcolours: Validate color codes, fixes traceback
Kim Alvefur [Sun, 28 Feb 2016 14:03:01 +0000 (15:03 +0100)]
util.termcolours: Validate color codes, fixes traceback

8 years agoutil.termcolours: Add some CSS color names
Kim Alvefur [Sat, 27 Feb 2016 15:56:34 +0000 (16:56 +0100)]
util.termcolours: Add some CSS color names

8 years agoutil.termcolours: Add 256 color support
Kim Alvefur [Sat, 27 Feb 2016 15:47:12 +0000 (16:47 +0100)]
util.termcolours: Add 256 color support

8 years agoutil.datamanager: Explicit handling of each error condition (see #632)
Kim Alvefur [Sat, 27 Feb 2016 14:29:56 +0000 (15:29 +0100)]
util.datamanager: Explicit handling of each error condition (see #632)

8 years agoMerge 0.9->0.10
Kim Alvefur [Thu, 25 Feb 2016 21:37:41 +0000 (22:37 +0100)]
Merge 0.9->0.10

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 agoutil.termcolours: Remove argument from noop function [luacheck]
Kim Alvefur [Thu, 25 Feb 2016 21:33:58 +0000 (22:33 +0100)]
util.termcolours: Remove argument from noop function [luacheck]

8 years agoutil.termcolours: Silence luacheck warning
Kim Alvefur [Thu, 25 Feb 2016 21:33:40 +0000 (22:33 +0100)]
util.termcolours: Silence luacheck warning

8 years agoutil.template: Use separate variables for source and compiled function [luacheck]
Kim Alvefur [Thu, 25 Feb 2016 21:32:13 +0000 (22:32 +0100)]
util.template: Use separate variables for source and compiled function [luacheck]

8 years agoutil.template: Silence luacheck warnings about unused loop vars
Kim Alvefur [Thu, 25 Feb 2016 21:31:13 +0000 (22:31 +0100)]
util.template: Silence luacheck warnings about unused loop vars

8 years agocerts/Makefile: Add target for generating DH params
Kim Alvefur [Thu, 25 Feb 2016 14:36:12 +0000 (15:36 +0100)]
certs/Makefile: Add target for generating DH params

8 years agoprosodyctl: Allow a DN path to be given to 'cert generate' command (fixes #349)
Kim Alvefur [Thu, 25 Feb 2016 14:35:44 +0000 (15:35 +0100)]
prosodyctl: Allow a DN path to be given to 'cert generate' command (fixes #349)

8 years agoutil.openssl: Allow order of distinguished name fields to be included in config
Kim Alvefur [Thu, 25 Feb 2016 14:34:38 +0000 (15:34 +0100)]
util.openssl: Allow order of distinguished name fields to be included in config

8 years agoprosodyctl: Create host.sessions table, (needed by 1295e14614f4) (thanks goffi)
Kim Alvefur [Wed, 24 Feb 2016 10:15:27 +0000 (11:15 +0100)]
prosodyctl: Create host.sessions table, (needed by 1295e14614f4) (thanks goffi)

8 years agoutil.crand: Include stdlib.h instead of malloc.h for portability (thanks Tobias)
Kim Alvefur [Mon, 22 Feb 2016 21:56:05 +0000 (22:56 +0100)]
util.crand: Include stdlib.h instead of malloc.h for portability (thanks Tobias)

8 years agoutil.crand: C binding to one of OpenSSL, Linux getrandom() or OpenBSD arc4random...
Kim Alvefur [Mon, 22 Feb 2016 17:44:43 +0000 (18:44 +0100)]
util.crand: C binding to one of OpenSSL, Linux getrandom() or OpenBSD arc4random() CSPRNG

8 years agoutil.iterators: Use table.pack() on Lua 5.2
Kim Alvefur [Mon, 22 Feb 2016 16:43:40 +0000 (17:43 +0100)]
util.iterators: Use table.pack() on Lua 5.2

8 years agoutil.multitable: Localize unpack() in Lua 5.2 compatible way
Kim Alvefur [Mon, 22 Feb 2016 16:40:42 +0000 (17:40 +0100)]
util.multitable: Localize unpack() in Lua 5.2 compatible way

8 years agoutil.iterators: Localize unpack() in Lua 5.2 compatible way
Kim Alvefur [Mon, 22 Feb 2016 16:38:46 +0000 (17:38 +0100)]
util.iterators: Localize unpack() in Lua 5.2 compatible way

8 years agoutil.import: Localize unpack() in Lua 5.2 compatible way
Kim Alvefur [Mon, 22 Feb 2016 16:37:55 +0000 (17:37 +0100)]
util.import: Localize unpack() in Lua 5.2 compatible way

8 years agoutil.debug: Silence luacheck warning about modifying 'debug' lib
Kim Alvefur [Mon, 22 Feb 2016 16:34:42 +0000 (17:34 +0100)]
util.debug: Silence luacheck warning about modifying 'debug' lib

8 years agoutil.session: Fix luacheck warnings
Kim Alvefur [Mon, 22 Feb 2016 16:32:11 +0000 (17:32 +0100)]
util.session: Fix luacheck warnings

8 years agoutil.sql: Localize unpack() in Lua 5.2 compatible way
Kim Alvefur [Mon, 22 Feb 2016 16:30:12 +0000 (17:30 +0100)]
util.sql: Localize unpack() in Lua 5.2 compatible way

8 years agomod_storage_sql: Treat non-existent archive IDs as beyound the end of the archive...
Kim Alvefur [Mon, 22 Feb 2016 14:23:27 +0000 (15:23 +0100)]
mod_storage_sql: Treat non-existent archive IDs as beyound the end of the archive (fixes #624) (tested on sqlite3 only)

8 years agousermanager: Shortcircuit user existence check if they have existing sessions
Kim Alvefur [Sun, 21 Feb 2016 18:30:45 +0000 (19:30 +0100)]
usermanager: Shortcircuit user existence check if they have existing sessions

8 years agomod_debug_sql: Small plugin that enables raw SQL query logging (for debugging)
Kim Alvefur [Sun, 21 Feb 2016 18:29:31 +0000 (19:29 +0100)]
mod_debug_sql: Small plugin that enables raw SQL query logging (for debugging)

8 years agomod_storage_sql: Remove debug logging of archive queries
Kim Alvefur [Sun, 21 Feb 2016 18:29:00 +0000 (19:29 +0100)]
mod_storage_sql: Remove debug logging of archive queries

8 years agoutil.sql: Raw query debug logging (needs to be explicitly enabled by a plugin)
Kim Alvefur [Sun, 21 Feb 2016 18:25:01 +0000 (19:25 +0100)]
util.sql: Raw query debug logging (needs to be explicitly enabled by a plugin)

8 years agomod_storage_sql: Lower message about new engine creation to debug level
Kim Alvefur [Sun, 21 Feb 2016 18:01:26 +0000 (19:01 +0100)]
mod_storage_sql: Lower message about new engine creation to debug level

8 years agotests: Add minimal test for util.random that checks that it returns the number of...
Kim Alvefur [Sun, 21 Feb 2016 17:05:54 +0000 (18:05 +0100)]
tests: Add minimal test for util.random that checks that it returns the number of bytes requested

8 years agomod_storage_sql: Share SQL connections with same parameters across VirtualHosts ...
Kim Alvefur [Sun, 21 Feb 2016 13:53:19 +0000 (14:53 +0100)]
mod_storage_sql: Share SQL connections with same parameters across VirtualHosts (fixes #576)

8 years agomod_storage_sql: Fix setting value to false in map store
Kim Alvefur [Fri, 19 Feb 2016 18:22:18 +0000 (19:22 +0100)]
mod_storage_sql: Fix setting value to false in map store

8 years agorostermanager: Require storagemanager at the top, fixes traceback on Lua 5.2
Matthew Wild [Fri, 19 Feb 2016 12:15:02 +0000 (12:15 +0000)]
rostermanager: Require storagemanager at the top, fixes traceback on Lua 5.2

8 years agoMakefile: Use runtime set by configure (fixes #629)
Kim Alvefur [Thu, 18 Feb 2016 18:08:01 +0000 (19:08 +0100)]
Makefile: Use runtime set by configure (fixes #629)

8 years agologgingmanager,modulemanager,moduleapi: Ignore warning about accessing _G.unpack...
Kim Alvefur [Thu, 18 Feb 2016 13:57:51 +0000 (14:57 +0100)]
loggingmanager,modulemanager,moduleapi: Ignore warning about accessing _G.unpack [luacheck]

8 years agologgingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+
Kim Alvefur [Thu, 18 Feb 2016 13:57:04 +0000 (14:57 +0100)]
loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+

8 years agocertmanager: Localize tonumber
Matthew Wild [Thu, 18 Feb 2016 13:48:45 +0000 (13:48 +0000)]
certmanager: Localize tonumber

8 years agologgingmanager: Import select() to fix global access
Matthew Wild [Thu, 18 Feb 2016 13:21:12 +0000 (13:21 +0000)]
loggingmanager: Import select() to fix global access

8 years agomod_storage_sql: Silence some harmless luacheck warnings
Kim Alvefur [Tue, 9 Feb 2016 16:24:04 +0000 (17:24 +0100)]
mod_storage_sql: Silence some harmless luacheck warnings

8 years agorostermanager: Use map stores when only one contact is changed
Kim Alvefur [Tue, 9 Feb 2016 16:09:01 +0000 (17:09 +0100)]
rostermanager: Use map stores when only one contact is changed

8 years agorostermanager: Use storagemanager
Kim Alvefur [Tue, 9 Feb 2016 16:01:04 +0000 (17:01 +0100)]
rostermanager: Use storagemanager

8 years agomod_storage_sql: Implement map:set_keys, allowing multiple keys to be set in the...
Kim Alvefur [Tue, 9 Feb 2016 15:56:27 +0000 (16:56 +0100)]
mod_storage_sql: Implement map:set_keys, allowing multiple keys to be set in the same transaction

8 years agostoragemanager: Add set_keys method to map store shim
Kim Alvefur [Tue, 9 Feb 2016 15:54:56 +0000 (16:54 +0100)]
storagemanager: Add set_keys method to map store shim

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

9 years agostoragemanager: Fix map store shim if store is empty
Kim Alvefur [Fri, 8 Aug 2014 10:38:35 +0000 (12:38 +0200)]
storagemanager: Fix map store shim if store is empty

9 years agostoragemanager: When map store isn't available, fallback to keyval store [backported...
daurnimator [Thu, 7 Aug 2014 16:15:15 +0000 (12:15 -0400)]
storagemanager: When map store isn't available, fallback to keyval store [backported from trunk]

8 years agomod_storage_sql: Support non-string keys in map store
Kim Alvefur [Mon, 8 Feb 2016 19:23:12 +0000 (20:23 +0100)]
mod_storage_sql: Support non-string keys in map store

8 years agocertmanager: Try filename.key if certificate is set to a full filename ending with...
Kim Alvefur [Fri, 5 Feb 2016 15:12:01 +0000 (16:12 +0100)]
certmanager: Try filename.key if certificate is set to a full filename ending with .crt

8 years agocertmanager: Apply global ssl config later so certificate/key is not overwritten...
Kim Alvefur [Fri, 5 Feb 2016 14:03:39 +0000 (15:03 +0100)]
certmanager: Apply global ssl config later so certificate/key is not overwritten by magic

8 years agocertmanager: Support new certificate configuration for non-XMPP services too (fixes...
Matthew Wild [Fri, 5 Feb 2016 00:03:41 +0000 (00:03 +0000)]
certmanager: Support new certificate configuration for non-XMPP services too (fixes #614)

8 years agologgingmanager: Stringify all arguments to format so we can finally see the *real...
Kim Alvefur [Thu, 4 Feb 2016 19:45:37 +0000 (20:45 +0100)]
loggingmanager: Stringify all arguments to format so we can finally see the *real* error messages

8 years agologgingmanager: Remove Windows hack, buffer_mode should fix this
Kim Alvefur [Thu, 4 Feb 2016 17:40:24 +0000 (18:40 +0100)]
loggingmanager: Remove Windows hack, buffer_mode should fix this

8 years agologgingmanager: Write out timestamps in same write() call as everything else
Kim Alvefur [Thu, 4 Feb 2016 16:57:12 +0000 (17:57 +0100)]
loggingmanager: Write out timestamps in same write() call as everything else

8 years agologgingmanager: Make initial value for width of log name configurable
Kim Alvefur [Thu, 4 Feb 2016 16:51:39 +0000 (17:51 +0100)]
loggingmanager: Make initial value for width of log name configurable

8 years agologgingmanager: Move logic for adaptive column width into file sink, append tab if...
Kim Alvefur [Thu, 4 Feb 2016 16:49:09 +0000 (17:49 +0100)]
loggingmanager: Move logic for adaptive column width into file sink, append tab if disabled (fixes separation between name and level in plain file sinks)

8 years agologgingmanager: Refactor the console log sink to re-use the stdout sink which in...
Kim Alvefur [Thu, 4 Feb 2016 16:33:16 +0000 (17:33 +0100)]
loggingmanager: Refactor the console log sink to re-use the stdout sink which in turn uses the file sink (tailcalls!)

8 years agologgingmanager: Write out color code, log level and reset code in one call
Kim Alvefur [Thu, 4 Feb 2016 16:03:04 +0000 (17:03 +0100)]
loggingmanager: Write out color code, log level and reset code in one call