prosody.git
8 years agoconfigure, Makefile: Make compatible with plain Bourne shell as used on Solaris....
Matthew Wild [Wed, 2 Sep 2015 17:54:34 +0000 (18:54 +0100)]
configure, Makefile: Make compatible with plain Bourne shell as used on Solaris. Fixes #418 (thanks jcea)

8 years agostoragemanager: Check if drivers support purging, warn otherwise
Kim Alvefur [Wed, 2 Sep 2015 13:26:28 +0000 (15:26 +0200)]
storagemanager: Check if drivers support purging, warn otherwise

8 years agoprosody: Set a luasocket global, fixes undefined global access in loop() (pending...
Kim Alvefur [Wed, 2 Sep 2015 12:25:30 +0000 (14:25 +0200)]
prosody: Set a luasocket global, fixes undefined global access in loop() (pending util.startup)

8 years agostoragemanager: Export purge (fixes deleting users from usermanager) (thanks mt)
Kim Alvefur [Wed, 2 Sep 2015 12:23:09 +0000 (14:23 +0200)]
storagemanager: Export purge (fixes deleting users from usermanager) (thanks mt)

8 years agoutil.sql: Export db2uri (mod_storage_sql2 command uses it) (thanks mike)
Kim Alvefur [Wed, 2 Sep 2015 12:14:22 +0000 (14:14 +0200)]
util.sql: Export db2uri (mod_storage_sql2 command uses it) (thanks mike)

8 years agoutil.sql: Log when transactions begin
Kim Alvefur [Sun, 30 Aug 2015 11:45:36 +0000 (13:45 +0200)]
util.sql: Log when transactions begin

8 years agomod_carbons: Get full_ and bare_sessions from the prosody global [luacheck]
Kim Alvefur [Thu, 27 Aug 2015 10:17:12 +0000 (12:17 +0200)]
mod_carbons: Get full_ and bare_sessions from the prosody global [luacheck]

8 years agomod_carbons: Carbon chat messages or normal messages that have a body
Kim Alvefur [Wed, 26 Aug 2015 15:35:41 +0000 (17:35 +0200)]
mod_carbons: Carbon chat messages or normal messages that have a body

8 years agoutil.hex: Normalize hex to lowercase and discard non-hex input
Kim Alvefur [Wed, 26 Aug 2015 12:32:20 +0000 (14:32 +0200)]
util.hex: Normalize hex to lowercase and discard non-hex input

8 years agoMerge 0.9->0.10
Kim Alvefur [Wed, 26 Aug 2015 11:17:10 +0000 (13:17 +0200)]
Merge 0.9->0.10

8 years agomod_admin_adhoc: Declare local variable, don't set a global [luacheck]
Kim Alvefur [Wed, 26 Aug 2015 11:08:51 +0000 (13:08 +0200)]
mod_admin_adhoc: Declare local variable, don't set a global [luacheck]

8 years agomod_admin_adhoc: Import missing util.set (fixes #518)
Kim Alvefur [Wed, 26 Aug 2015 11:08:10 +0000 (13:08 +0200)]
mod_admin_adhoc: Import missing util.set (fixes #518)

8 years agomod_websocket: Import sessionmanager (fixes traceback)
Kim Alvefur [Fri, 21 Aug 2015 09:26:34 +0000 (11:26 +0200)]
mod_websocket: Import sessionmanager (fixes traceback)

8 years agoluacheckrc: Ignore unused _ENV variable
Kim Alvefur [Thu, 20 Aug 2015 08:10:36 +0000 (10:10 +0200)]
luacheckrc: Ignore unused _ENV variable

8 years agoejabberd2prosody: Support password stored as SCRAM hashes
Kim Alvefur [Thu, 20 Aug 2015 07:14:15 +0000 (09:14 +0200)]
ejabberd2prosody: Support password stored as SCRAM hashes

8 years agomod_component: Fire an event on successful component authentication (For Goffi)
Kim Alvefur [Mon, 10 Aug 2015 20:13:02 +0000 (22:13 +0200)]
mod_component: Fire an event on successful component authentication (For Goffi)

8 years agoMUC: Prevent admins from being given affiliatons other than owner
Kim Alvefur [Thu, 25 Jun 2015 15:58:24 +0000 (17:58 +0200)]
MUC: Prevent admins from being given affiliatons other than owner

8 years agoBacked out changeset bea3862b6bde in favor of a different approach
Kim Alvefur [Thu, 25 Jun 2015 15:54:19 +0000 (17:54 +0200)]
Backed out changeset bea3862b6bde in favor of a different approach

8 years agoMUC: Remove half of monkeypatch that was supposed to make admins always be room owner...
Kim Alvefur [Tue, 16 Jun 2015 13:13:47 +0000 (15:13 +0200)]
MUC: Remove half of monkeypatch that was supposed to make admins always be room owners, fixes #458

9 years agos2smanager: Make sure destroyed sessions have a sends2s method
Kim Alvefur [Wed, 13 May 2015 22:22:13 +0000 (00:22 +0200)]
s2smanager: Make sure destroyed sessions have a sends2s method

9 years agomod_s2s: Mark stream as opened directly after opening stream, prevents session.close...
Kim Alvefur [Wed, 13 May 2015 19:56:22 +0000 (21:56 +0200)]
mod_s2s: Mark stream as opened directly after opening stream, prevents session.close opening it again

9 years agomod_s2s: Don't cache session.sends2s (or do it later), prevents sending data after...
Kim Alvefur [Wed, 13 May 2015 19:55:08 +0000 (21:55 +0200)]
mod_s2s: Don't cache session.sends2s (or do it later), prevents sending data after session was closed

9 years agomod_s2s/s2sout: Use the local address assigned to UDP sockets instead of util.net...
Kim Alvefur [Wed, 13 May 2015 19:47:39 +0000 (21:47 +0200)]
mod_s2s/s2sout: Use the local address assigned to UDP sockets instead of util.net to enumerate possible source addresses

9 years agoutil.datamanager: Fix traceback from trying to purge when storage is empty or otherwi...
Kim Alvefur [Wed, 13 May 2015 19:44:13 +0000 (21:44 +0200)]
util.datamanager: Fix traceback from trying to purge when storage is empty or otherwise unaccessible (fixes #496)

9 years agomod_s2s/s2sout: Remove now unused config option dns_max_depth
Kim Alvefur [Wed, 13 May 2015 19:43:05 +0000 (21:43 +0200)]
mod_s2s/s2sout: Remove now unused config option dns_max_depth

9 years agonet.dns: Make sure argument to math.randomseed does not overflow a 32 bit *signed...
Kim Alvefur [Sun, 26 Apr 2015 17:50:24 +0000 (19:50 +0200)]
net.dns: Make sure argument to math.randomseed does not overflow a 32 bit *signed* int (blame Lua). Closes #439

9 years agoutil-src/*.c: Invert Lua 5.2 compat to be 5.2+ by default and a macro to support 5.1
Kim Alvefur [Sun, 26 Apr 2015 10:38:37 +0000 (12:38 +0200)]
util-src/*.c: Invert Lua 5.2 compat to be 5.2+ by default and a macro to support 5.1

9 years agoportmanager: Add forward declarations
Kim Alvefur [Tue, 7 Apr 2015 22:45:26 +0000 (00:45 +0200)]
portmanager: Add forward declarations

9 years agorostermanager: Add forward declarations
Kim Alvefur [Tue, 7 Apr 2015 22:44:30 +0000 (00:44 +0200)]
rostermanager: Add forward declarations

9 years agoutil.sasl.scram: Get rid of module call
Kim Alvefur [Tue, 7 Apr 2015 21:26:32 +0000 (23:26 +0200)]
util.sasl.scram: Get rid of module call

9 years agoutil.datamanager: Fix traceback due to %s in log message
Kim Alvefur [Fri, 3 Apr 2015 10:10:30 +0000 (12:10 +0200)]
util.datamanager: Fix traceback due to %s in log message

9 years agonet.dns, mod_s2s: Add chasing of CNAMEs to net.dns and remove it from mod_s2s
Kim Alvefur [Fri, 24 Apr 2015 12:14:01 +0000 (14:14 +0200)]
net.dns, mod_s2s: Add chasing of CNAMEs to net.dns and remove it from mod_s2s

9 years agoTagging 0.9.8
Matthew Wild [Tue, 24 Mar 2015 19:12:04 +0000 (19:12 +0000)]
Tagging 0.9.8

9 years agomod_s2s: to/from attributes are required on s2s stream headers. Set them to '' when...
Matthew Wild [Tue, 24 Mar 2015 16:03:37 +0000 (16:03 +0000)]
mod_s2s: to/from attributes are required on s2s stream headers. Set them to '' when not available. Fixes #468.

9 years agosessionmanager: Return 'not-allowed' error instead of the non-existent 'already-bound...
Matthew Wild [Tue, 24 Mar 2015 15:57:46 +0000 (15:57 +0000)]
sessionmanager: Return 'not-allowed' error instead of the non-existent 'already-bound' error when client tries to bind a resource twice on the same stream (thanks Flow) fixes issue #484.

9 years agomod_http: Return a static string from module:http_url() when no ports are enabled...
Kim Alvefur [Mon, 23 Mar 2015 17:45:02 +0000 (18:45 +0100)]
mod_http: Return a static string from module:http_url() when no ports are enabled and log a warning

9 years agomod_http: Log a debug message when adding new http apps and warn if no http ports...
Kim Alvefur [Mon, 23 Mar 2015 17:44:12 +0000 (18:44 +0100)]
mod_http: Log a debug message when adding new http apps and warn if no http ports are enabled

9 years agoBackout 7726b627c3ea
Kim Alvefur [Mon, 23 Mar 2015 17:40:12 +0000 (18:40 +0100)]
Backout 7726b627c3ea

9 years agoutf8_sequences.txt: Oops
Matthew Wild [Mon, 23 Mar 2015 17:23:11 +0000 (17:23 +0000)]
utf8_sequences.txt: Oops

9 years agotests: Add UTF-8 validity tests
Matthew Wild [Mon, 23 Mar 2015 17:16:54 +0000 (17:16 +0000)]
tests: Add UTF-8 validity tests

9 years agoMerge with Zash
Matthew Wild [Mon, 23 Mar 2015 14:05:55 +0000 (14:05 +0000)]
Merge with Zash

9 years agoutil.encodings: Expose UTF-8 validation and length checking functions
Kim Alvefur [Mon, 23 Mar 2015 13:27:30 +0000 (14:27 +0100)]
util.encodings: Expose UTF-8 validation and length checking functions

9 years agoutil.encodings: Perform validation of UTF-8 strings before passing to libidn (Based...
Kim Alvefur [Mon, 23 Mar 2015 13:26:34 +0000 (14:26 +0100)]
util.encodings: Perform validation of UTF-8 strings before passing to libidn (Based on code from the utf8 library in Lua 5.3)

9 years agomod_http: Log event name when adding a HTTP app's hooks
Matthew Wild [Sat, 14 Mar 2015 22:39:23 +0000 (22:39 +0000)]
mod_http: Log event name when adding a HTTP app's hooks

9 years agonet.http.server: Log event name when firing a request event
Matthew Wild [Sat, 14 Mar 2015 22:39:03 +0000 (22:39 +0000)]
net.http.server: Log event name when firing a request event

9 years agoutil.json: Remove use of newproxy
Kim Alvefur [Fri, 13 Mar 2015 20:11:33 +0000 (21:11 +0100)]
util.json: Remove use of newproxy

9 years agoprosodyctl: Import LuaSocket to a local, don't assume that a global will be set
Kim Alvefur [Fri, 13 Mar 2015 19:12:12 +0000 (20:12 +0100)]
prosodyctl: Import LuaSocket to a local, don't assume that a global will be set

9 years agoutil.helpers: Fix order of functions using each other [fixes 00412b36166f]
Kim Alvefur [Tue, 3 Mar 2015 19:27:35 +0000 (20:27 +0100)]
util.helpers: Fix order of functions using each other [fixes 00412b36166f]

9 years agoconfigure: Fix for commit cd0088c73daf - update LIBDIR if --prefix is set and --libdi...
Matthew Wild [Tue, 24 Feb 2015 15:19:20 +0000 (15:19 +0000)]
configure: Fix for commit cd0088c73daf - update LIBDIR if --prefix is set and --libdir isn't (thanks Medics)

9 years agonet.server_{select,event}: Don't rely on LuaSocket and LuaSec being present in the...
Kim Alvefur [Mon, 23 Feb 2015 11:04:43 +0000 (12:04 +0100)]
net.server_{select,event}: Don't rely on LuaSocket and LuaSec being present in the globals table

9 years agomod_admin_telnet: Remove now broken importing of modulemanager from various commands...
Kim Alvefur [Sun, 22 Feb 2015 18:06:26 +0000 (19:06 +0100)]
mod_admin_telnet: Remove now broken importing of modulemanager from various commands, use upvalue defined at top of file (thanks daurnimator)

9 years agonet.*: Remove use of module() function
Kim Alvefur [Sat, 21 Feb 2015 09:45:24 +0000 (10:45 +0100)]
net.*: Remove use of module() function

9 years agocore.*: Remove use of module() function
Kim Alvefur [Sat, 21 Feb 2015 09:42:19 +0000 (10:42 +0100)]
core.*: Remove use of module() function

9 years agoutil.dependencies: Only abort on Lua versions before 5.1, log a warning about 5.2...
Kim Alvefur [Sat, 21 Feb 2015 09:38:44 +0000 (10:38 +0100)]
util.dependencies: Only abort on Lua versions before 5.1, log a warning about 5.2 and above for now

9 years agoutil.*: Remove use of module() function, make all module functions local and return...
Kim Alvefur [Sat, 21 Feb 2015 09:36:37 +0000 (10:36 +0100)]
util.*: Remove use of module() function, make all module functions local and return them in a table at the end

8 years agoMerge 0.9->0.10
Kim Alvefur [Mon, 10 Aug 2015 20:16:05 +0000 (22:16 +0200)]
Merge 0.9->0.10

8 years agoutil.interpolation: Add support for filter functions
Kim Alvefur [Fri, 7 Aug 2015 11:31:12 +0000 (13:31 +0200)]
util.interpolation: Add support for filter functions

8 years agoutil.{interpolation,prosodyctl,sql}: Trim trailing whitespace
Kim Alvefur [Fri, 17 Jul 2015 10:43:04 +0000 (12:43 +0200)]
util.{interpolation,prosodyctl,sql}: Trim trailing whitespace

8 years agoutil.sql: Add safety check to ensure our chosen connection charset is actually being...
Matthew Wild [Wed, 8 Jul 2015 14:25:42 +0000 (15:25 +0100)]
util.sql: Add safety check to ensure our chosen connection charset is actually being used (MySQL)

8 years agoutil.sql: Fix log level of debug message
Matthew Wild [Wed, 8 Jul 2015 14:16:17 +0000 (15:16 +0100)]
util.sql: Fix log level of debug message

8 years agoutil.sql: Log debug message when connecting to database
Matthew Wild [Wed, 8 Jul 2015 14:15:32 +0000 (15:15 +0100)]
util.sql: Log debug message when connecting to database

8 years agoutil.sql: Make set_encoding() return failure of SET NAMES
Matthew Wild [Wed, 8 Jul 2015 14:14:24 +0000 (15:14 +0100)]
util.sql: Make set_encoding() return failure of SET NAMES

8 years agoutil.sql: Return failure if set_encoding() fails
Matthew Wild [Wed, 8 Jul 2015 14:10:25 +0000 (15:10 +0100)]
util.sql: Return failure if set_encoding() fails

8 years agomod_storage_sql2: Upgrade table if its charset does not match our connection's charse...
Matthew Wild [Wed, 8 Jul 2015 14:07:23 +0000 (15:07 +0100)]
mod_storage_sql2: Upgrade table if its charset does not match our connection's charset (thanks Zash)

8 years agoutil.sql: Use appropriate collation for the chosen character set - fixes MySQL silent...
Matthew Wild [Wed, 8 Jul 2015 14:06:20 +0000 (15:06 +0100)]
util.sql: Use appropriate collation for the chosen character set - fixes MySQL silently ignoring our SET NAMES command when we use utf8mb4

8 years agoutil.sql: Create table with same charset as the charset we selected for our connectio...
Matthew Wild [Wed, 8 Jul 2015 14:04:23 +0000 (15:04 +0100)]
util.sql: Create table with same charset as the charset we selected for our connection, also use corresponding _bin collation

8 years agoutil.sql: Allow onconnect callback to fail connection to the DB by returning false...
Matthew Wild [Tue, 7 Jul 2015 16:43:14 +0000 (17:43 +0100)]
util.sql: Allow onconnect callback to fail connection to the DB by returning false, err

8 years agomod_storage_sql2: Don't upgrade tables without admin intervention
Matthew Wild [Tue, 7 Jul 2015 16:42:29 +0000 (17:42 +0100)]
mod_storage_sql2: Don't upgrade tables without admin intervention

8 years agomod_storage_sql2: Add prosodyctl command to upgrade tables from the command-line
Matthew Wild [Tue, 7 Jul 2015 16:41:09 +0000 (17:41 +0100)]
mod_storage_sql2: Add prosodyctl command to upgrade tables from the command-line

8 years agomod_storage_sql2: Add missing return to upgrade_table(), so we know if an upgrade...
Matthew Wild [Tue, 7 Jul 2015 16:40:23 +0000 (17:40 +0100)]
mod_storage_sql2: Add missing return to upgrade_table(), so we know if an upgrade is required

8 years agomod_storage_sql2: Rename variable to avoid name clash
Matthew Wild [Tue, 7 Jul 2015 16:39:56 +0000 (17:39 +0100)]
mod_storage_sql2: Rename variable to avoid name clash

8 years agonet.dns: Remove resolver:new(), as it needlessly and incorrectly duplicates dns.resol...
Matthew Wild [Mon, 6 Jul 2015 18:11:39 +0000 (19:11 +0100)]
net.dns: Remove resolver:new(), as it needlessly and incorrectly duplicates dns.resolver()

8 years agoMerge with 0.10
Matthew Wild [Mon, 6 Jul 2015 16:07:05 +0000 (17:07 +0100)]
Merge with 0.10

8 years agoprosodyctl: check: Add some more known global config options
Kim Alvefur [Sun, 5 Jul 2015 20:20:29 +0000 (22:20 +0200)]
prosodyctl: check: Add some more known global config options

8 years agoutil.sql: Call onconnect, provide noop dummy if not set
Kim Alvefur [Thu, 2 Jul 2015 20:32:44 +0000 (22:32 +0200)]
util.sql: Call onconnect, provide noop dummy if not set

8 years agoluacheckrc: Allow plugins to implement functions under module.* (module.load, etc.)
Matthew Wild [Mon, 29 Jun 2015 12:50:31 +0000 (13:50 +0100)]
luacheckrc: Allow plugins to implement functions under module.* (module.load, etc.)

8 years agoRemove sql.lib.lua, not used anymore
Kim Alvefur [Sat, 27 Jun 2015 14:45:31 +0000 (16:45 +0200)]
Remove sql.lib.lua, not used anymore

8 years agomod_storage_sql2: Validate configuration after normalizing SQLite3 database path...
Kim Alvefur [Sat, 27 Jun 2015 13:59:37 +0000 (15:59 +0200)]
mod_storage_sql2: Validate configuration after normalizing SQLite3 database path (fixes traceback with default config)

8 years agoMerge 0.9->0.10
Kim Alvefur [Thu, 25 Jun 2015 16:54:01 +0000 (18:54 +0200)]
Merge 0.9->0.10

8 years agoMerge with 0.10
Matthew Wild [Wed, 24 Jun 2015 22:25:42 +0000 (23:25 +0100)]
Merge with 0.10

8 years agomod_storage_sql2: Break up monolithic code into functions, theoretically no functiona...
Matthew Wild [Wed, 24 Jun 2015 22:24:32 +0000 (23:24 +0100)]
mod_storage_sql2: Break up monolithic code into functions, theoretically no functionality changes.

8 years agomod_storage_sql2: Improve logging when database read fails
Matthew Wild [Wed, 24 Jun 2015 21:56:50 +0000 (22:56 +0100)]
mod_storage_sql2: Improve logging when database read fails

8 years agomod_storage_sql2: Some reformatting and variable name improvements
Matthew Wild [Wed, 24 Jun 2015 21:55:41 +0000 (22:55 +0100)]
mod_storage_sql2: Some reformatting and variable name improvements

8 years agomod_storage_sql2: Add some comments
Matthew Wild [Wed, 24 Jun 2015 21:54:17 +0000 (22:54 +0100)]
mod_storage_sql2: Add some comments

9 years agoutil.sql: Remove built-in engine caching. This is the wrong layer to do this, and...
Matthew Wild [Wed, 3 Jun 2015 14:57:46 +0000 (15:57 +0100)]
util.sql: Remove built-in engine caching. This is the wrong layer to do this, and unintentionally sharing connections could cause problems (e.g. when interleaving multiple queries and result fetching)

9 years agoutil.sql: Expose db2uri helper function
Matthew Wild [Wed, 3 Jun 2015 14:55:43 +0000 (15:55 +0100)]
util.sql: Expose db2uri helper function

9 years agoutil.sql: Rename some variable to match conventions
Matthew Wild [Wed, 3 Jun 2015 14:54:52 +0000 (15:54 +0100)]
util.sql: Rename some variable to match conventions

9 years agotests: Add tests for util.queue
Matthew Wild [Wed, 3 Jun 2015 14:53:27 +0000 (15:53 +0100)]
tests: Add tests for util.queue

9 years agoutil.queue: Allow optional wrap-around when pushing, overwriting oldest unread item
Matthew Wild [Wed, 3 Jun 2015 14:51:07 +0000 (15:51 +0100)]
util.queue: Allow optional wrap-around when pushing, overwriting oldest unread item

9 years agoutil.sql: Remove unused functions and unused commented code
Matthew Wild [Sat, 30 May 2015 21:23:19 +0000 (22:23 +0100)]
util.sql: Remove unused functions and unused commented code

9 years agomod_storage_sql2: Fix argument compat thing from 41725f3df3cc, it was backwards
Kim Alvefur [Thu, 21 May 2015 10:11:08 +0000 (12:11 +0200)]
mod_storage_sql2: Fix argument compat thing from 41725f3df3cc, it was backwards

9 years agomod_storage_sql2: Add a 'caps' table for indicating support for optional features
Kim Alvefur [Tue, 19 May 2015 16:24:53 +0000 (18:24 +0200)]
mod_storage_sql2: Add a 'caps' table for indicating support for optional features

9 years agomod_storage_sql2: Change order of arguments to :append to be the same as return value...
Kim Alvefur [Tue, 19 May 2015 16:24:09 +0000 (18:24 +0200)]
mod_storage_sql2: Change order of arguments to :append to be the same as return values from :find iterator

9 years agomod_storage_sql2: Include 'with' field from iterator like some 3rd party archive...
Kim Alvefur [Tue, 19 May 2015 16:21:23 +0000 (18:21 +0200)]
mod_storage_sql2: Include 'with' field from iterator like some 3rd party archive-capable storage modules

9 years agoutil.interpolation: A template engine for text
Kim Alvefur [Tue, 19 May 2015 13:33:20 +0000 (15:33 +0200)]
util.interpolation: A template engine for text

9 years agologgingmanager: Rename function arguments to avoid name conflict [luacheck] (core...
Matthew Wild [Mon, 18 May 2015 18:09:07 +0000 (19:09 +0100)]
loggingmanager: Rename function arguments to avoid name conflict [luacheck] (core/ is now luacheck-clean!)

9 years agoconfigmanager: Refactor function to avoid re-declaring local variable [luacheck]
Matthew Wild [Mon, 18 May 2015 18:07:31 +0000 (19:07 +0100)]
configmanager: Refactor function to avoid re-declaring local variable [luacheck]

9 years agoconfigmanager: Rename unused function arguments [luacheck]
Matthew Wild [Mon, 18 May 2015 18:07:06 +0000 (19:07 +0100)]
configmanager: Rename unused function arguments [luacheck]

9 years agoconfigmanager: Rename variable to avoid name conflicts [luacheck]
Matthew Wild [Mon, 18 May 2015 18:06:34 +0000 (19:06 +0100)]
configmanager: Rename variable to avoid name conflicts [luacheck]

9 years agoconfigmanager: Rename unused function argument [luacheck]
Matthew Wild [Mon, 18 May 2015 18:05:26 +0000 (19:05 +0100)]
configmanager: Rename unused function argument [luacheck]