prosody.git
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

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

8 years agologgingmanager: Don't reset default timestamp that is not changed by any other code
Kim Alvefur [Thu, 4 Feb 2016 15:56:05 +0000 (16:56 +0100)]
loggingmanager: Don't reset default timestamp that is not changed by any other code

8 years agoutil.logger: Silence luacheck warning
Kim Alvefur [Thu, 4 Feb 2016 15:40:32 +0000 (16:40 +0100)]
util.logger: Silence luacheck warning

8 years agoutil.logger: Remove unused locals
Kim Alvefur [Thu, 4 Feb 2016 15:38:56 +0000 (16:38 +0100)]
util.logger: Remove unused locals

8 years agomod_groups: Move variable to smaller scope
Kim Alvefur [Thu, 4 Feb 2016 09:07:02 +0000 (10:07 +0100)]
mod_groups: Move variable to smaller scope

8 years agomod_groups: Use module:get_option_path, look for file relative to config dir
Kim Alvefur [Thu, 4 Feb 2016 09:06:09 +0000 (10:06 +0100)]
mod_groups: Use module:get_option_path, look for file relative to config dir

8 years agomoduleapi: Add API method for getting a file path
Kim Alvefur [Thu, 4 Feb 2016 09:05:35 +0000 (10:05 +0100)]
moduleapi: Add API method for getting a file path

8 years agologgingmanager: Call setvbuf on output files, defaulting to line-buffered, instead...
Matthew Wild [Thu, 4 Feb 2016 14:56:49 +0000 (14:56 +0000)]
loggingmanager: Call setvbuf on output files, defaulting to line-buffered, instead of manually calling flush(). Adds 'buffer_mode' option to sink configuration for stdout, console and file sinks.

8 years agocore.certmanager: Look for certificate and key in a few different places
Kim Alvefur [Wed, 3 Feb 2016 21:44:29 +0000 (22:44 +0100)]
core.certmanager: Look for certificate and key in a few different places

8 years agoMUC: Fire a muc-disco#info event like in trunk so modules can extend the reply
Kim Alvefur [Wed, 3 Feb 2016 01:07:03 +0000 (02:07 +0100)]
MUC: Fire a muc-disco#info event like in trunk so modules can extend the reply

8 years agoAdd util.ringbuffer, a ringbuffer with a file handle like interface
Kim Alvefur [Tue, 2 Feb 2016 19:24:27 +0000 (20:24 +0100)]
Add util.ringbuffer, a ringbuffer with a file handle like interface

8 years agomodulemanager, util.pluginloader: Move logic for locating some module libraries to...
Matthew Wild [Mon, 1 Feb 2016 21:26:15 +0000 (21:26 +0000)]
modulemanager, util.pluginloader: Move logic for locating some module libraries to pluginloader, to fix problems with non-filesystem errors being masked by the second load_code call

8 years agoutil.random: Restore friendlier error from 0.9/util.uuid
Kim Alvefur [Sun, 31 Jan 2016 16:27:15 +0000 (17:27 +0100)]
util.random: Restore friendlier error from 0.9/util.uuid

8 years agoCHANGES: Add websockets too (thanks av6)
Kim Alvefur [Fri, 29 Jan 2016 13:52:38 +0000 (14:52 +0100)]
CHANGES: Add websockets too (thanks av6)

8 years agoAdd a CHANGES file with new features in 0.10
Kim Alvefur [Thu, 28 Jan 2016 13:14:48 +0000 (14:14 +0100)]
Add a CHANGES file with new features in 0.10

8 years agotests: Use util.envload to load chunks (fixes #608)
Kim Alvefur [Thu, 28 Jan 2016 13:45:44 +0000 (14:45 +0100)]
tests: Use util.envload to load chunks (fixes #608)

8 years agoMerge 0.9->0.10
Matthew Wild [Wed, 27 Jan 2016 20:32:01 +0000 (20:32 +0000)]
Merge 0.9->0.10

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 agoMerge 0.9->0.10
Kim Alvefur [Tue, 26 Jan 2016 13:15:00 +0000 (14:15 +0100)]
Merge 0.9->0.10

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 agoMerge 0.9->0.10
Kim Alvefur [Fri, 22 Jan 2016 13:49:05 +0000 (14:49 +0100)]
Merge 0.9->0.10

8 years agomod_admin_telnet: Fix sorting of JIDs in c2s:show() family of functions (thanks looks...
Matthew Wild [Fri, 22 Jan 2016 13:20:00 +0000 (13:20 +0000)]
mod_admin_telnet: Fix sorting of JIDs in c2s:show() family of functions (thanks lookshe and Zash)

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 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 agonet.http.server: Return from listen_on() whatever net.server.addserver() returns
Kim Alvefur [Sat, 16 Jan 2016 21:43:11 +0000 (22:43 +0100)]
net.http.server: Return from listen_on() whatever net.server.addserver() returns

8 years agoutil.random: Open /dev/urandom read-only, make seed() a noop
Kim Alvefur [Tue, 12 Jan 2016 22:48:16 +0000 (23:48 +0100)]
util.random: Open /dev/urandom read-only, make seed() a noop

8 years agoprosodyctl: check config: Suggest moving modules enabled on all hosts to a global_mod...
Kim Alvefur [Tue, 12 Jan 2016 22:47:30 +0000 (23:47 +0100)]
prosodyctl: check config: Suggest moving modules enabled on all hosts to a global_modules enabled if that is unset

8 years agoprosody: Allow prosody.shutdown() to take an exit code for the process (thanks daurni...
Matthew Wild [Fri, 15 Jan 2016 00:51:01 +0000 (00:51 +0000)]
prosody: Allow prosody.shutdown() to take an exit code for the process (thanks daurnimator)

8 years agoprosodyctl check: Fix traceback if the global modules_enabled is unset
Kim Alvefur [Tue, 12 Jan 2016 00:13:57 +0000 (01:13 +0100)]
prosodyctl check: Fix traceback if the global modules_enabled is unset

8 years agomod_blocklist: Clear second level cache correctly on user deletion
Kim Alvefur [Mon, 11 Jan 2016 14:35:51 +0000 (15:35 +0100)]
mod_blocklist: Clear second level cache correctly on user deletion

8 years agoMerge 0.9->0.10
Kim Alvefur [Mon, 11 Jan 2016 14:33:18 +0000 (15:33 +0100)]
Merge 0.9->0.10

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 agotests: Add test for util.uuid (checks that the output format is correct)
Kim Alvefur [Sun, 10 Jan 2016 02:35:00 +0000 (03:35 +0100)]
tests: Add test for util.uuid (checks that the output format is correct)

8 years agotests: Correct mistake from latst merge, use the same variable name in all 3 places...
Kim Alvefur [Sun, 10 Jan 2016 02:25:16 +0000 (03:25 +0100)]
tests: Correct mistake from latst merge, use the same variable name in all 3 places where it matters

8 years agoMakefile: Add 'test' target that runs tests
Kim Alvefur [Sat, 9 Jan 2016 23:17:54 +0000 (00:17 +0100)]
Makefile: Add 'test' target that runs tests

8 years agomod_admin_telnet: c2s:count in less lines
Kim Alvefur [Sat, 9 Jan 2016 23:00:22 +0000 (00:00 +0100)]
mod_admin_telnet: c2s:count in less lines

8 years agomod_admin_telnet: Show unauthenticated clients identified by local/remote IP and...
Kim Alvefur [Sat, 9 Jan 2016 22:59:31 +0000 (23:59 +0100)]
mod_admin_telnet: Show unauthenticated clients identified by local/remote IP and port

8 years agomod_admin_telnet: c2s:show() etc, list all sessions including unauthenticated or...
Kim Alvefur [Sat, 9 Jan 2016 22:58:43 +0000 (23:58 +0100)]
mod_admin_telnet: c2s:show() etc, list all sessions including unauthenticated or not with no stream opened

8 years agomod_admin_telnet: Remove compat warning about 'console_banner' as a function
Kim Alvefur [Sat, 9 Jan 2016 23:01:28 +0000 (00:01 +0100)]
mod_admin_telnet: Remove compat warning about 'console_banner' as a function

8 years agonet.server_select: Add 'server' method to client connections (present in server_event)
Kim Alvefur [Sat, 9 Jan 2016 22:54:19 +0000 (23:54 +0100)]
net.server_select: Add 'server' method to client connections (present in server_event)

8 years agoprosodyctl: Show an example ssl config after generating a certificate
Kim Alvefur [Sat, 9 Jan 2016 15:58:39 +0000 (16:58 +0100)]
prosodyctl: Show an example ssl config after generating a certificate

8 years agorostermanager: Rename variable to avoid name clash [luacheck]
Kim Alvefur [Sat, 9 Jan 2016 14:18:46 +0000 (15:18 +0100)]
rostermanager: Rename variable to avoid name clash [luacheck]

8 years agotests: Fix merge, modulemanager test was removed
Kim Alvefur [Fri, 8 Jan 2016 15:20:02 +0000 (16:20 +0100)]
tests: Fix merge, modulemanager test was removed

8 years agoMerge 0.9->0.10
Kim Alvefur [Fri, 8 Jan 2016 15:16:08 +0000 (16:16 +0100)]
Merge 0.9->0.10

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