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

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

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 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]

9 years agoconfigmanager: Remove unnecessary function localizations [luacheck]
Matthew Wild [Mon, 18 May 2015 18:05:08 +0000 (19:05 +0100)]
configmanager: Remove unnecessary function localizations [luacheck]

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

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

9 years agoprosodyctl: Soft-require LuaSec and LuaEvent so they show up in the module version...
Kim Alvefur [Mon, 18 May 2015 20:04:12 +0000 (22:04 +0200)]
prosodyctl: Soft-require LuaSec and LuaEvent so they show up in the module version listing

9 years agomod_tls: Treat session.ssl_ctx being false as a signal that TLS is disabled
Kim Alvefur [Mon, 18 May 2015 19:48:58 +0000 (21:48 +0200)]
mod_tls: Treat session.ssl_ctx being false as a signal that TLS is disabled

9 years agomod_tls: Build <starttls/> as a stanza instead of with string concatenation
Kim Alvefur [Mon, 18 May 2015 19:43:24 +0000 (21:43 +0200)]
mod_tls: Build <starttls/> as a stanza instead of with string concatenation

9 years agoutil.x509: Tell LuaSec we want UTF-8 data
Kim Alvefur [Mon, 18 May 2015 19:32:05 +0000 (21:32 +0200)]
util.x509: Tell LuaSec we want UTF-8 data

9 years agomod_auth_internal_hashed: Use util.hex
Kim Alvefur [Mon, 18 May 2015 19:00:41 +0000 (21:00 +0200)]
mod_auth_internal_hashed: Use util.hex

9 years agohostmanager: Metatable with __tostring on hosts
Kim Alvefur [Mon, 18 May 2015 18:50:50 +0000 (20:50 +0200)]
hostmanager: Metatable with __tostring on hosts

9 years agomod_storage_xep0227: Silence luacheck warnings
Kim Alvefur [Fri, 15 May 2015 13:32:39 +0000 (15:32 +0200)]
mod_storage_xep0227: Silence luacheck warnings

9 years agomod_storage_xep0227: Store data from mod_auth_internal_hashed in a private namespace
Kim Alvefur [Fri, 15 May 2015 13:32:21 +0000 (15:32 +0200)]
mod_storage_xep0227: Store data from mod_auth_internal_hashed in a private namespace

9 years agomod_storage_xep0227: Use the registered namespace
Kim Alvefur [Fri, 15 May 2015 13:30:38 +0000 (15:30 +0200)]
mod_storage_xep0227: Use the registered namespace

9 years agomod_storage_xep0227: Update open method for current API
Kim Alvefur [Fri, 15 May 2015 13:29:05 +0000 (15:29 +0200)]
mod_storage_xep0227: Update open method for current API

9 years agomod_storage_xep0227: Return error from io.open if unable to open file for writing
Kim Alvefur [Fri, 15 May 2015 13:25:59 +0000 (15:25 +0200)]
mod_storage_xep0227: Return error from io.open if unable to open file for writing

9 years agomod_storage_xep0227: Open file for writing even if removing so os.remove has a file...
Kim Alvefur [Fri, 15 May 2015 13:25:37 +0000 (15:25 +0200)]
mod_storage_xep0227: Open file for writing even if removing so os.remove has a file to delete

9 years agomod_storage_xep0227: Close file handle after reading
Kim Alvefur [Fri, 15 May 2015 13:17:27 +0000 (15:17 +0200)]
mod_storage_xep0227: Close file handle after reading

9 years agomod_storage_xep0227: Use configured storage path
Kim Alvefur [Fri, 15 May 2015 13:16:03 +0000 (15:16 +0200)]
mod_storage_xep0227: Use configured storage path

9 years agomod_storage_xep0227: Rename to reflect current naming practices
Kim Alvefur [Fri, 15 May 2015 13:14:30 +0000 (15:14 +0200)]
mod_storage_xep0227: Rename to reflect current naming practices

9 years agoxep227store.lib.lua: Remove mostly duplicated code
Kim Alvefur [Fri, 15 May 2015 13:14:12 +0000 (15:14 +0200)]
xep227store.lib.lua: Remove mostly duplicated code

9 years agonet.http.codes: Update from registry
Kim Alvefur [Thu, 14 May 2015 18:47:37 +0000 (20:47 +0200)]
net.http.codes: Update from registry

9 years agoMerge 0.9->0.10
Kim Alvefur [Wed, 13 May 2015 22:22:56 +0000 (00:22 +0200)]
Merge 0.9->0.10

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 agoMerge
Kim Alvefur [Wed, 13 May 2015 20:32:40 +0000 (22:32 +0200)]
Merge

9 years agoMerge 0.9->0.10
Kim Alvefur [Wed, 13 May 2015 20:31:59 +0000 (22:31 +0200)]
Merge 0.9->0.10

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 agoportmanager: Remove unused argument from function [luacheck]
Matthew Wild [Wed, 13 May 2015 16:08:34 +0000 (17:08 +0100)]
portmanager: Remove unused argument from function [luacheck]

9 years agoportmanager: Rename variable to avoid name conflict [luacheck]
Matthew Wild [Wed, 13 May 2015 16:08:20 +0000 (17:08 +0100)]
portmanager: Rename variable to avoid name conflict [luacheck]

9 years agoportmanager: Add luacheck annotations
Matthew Wild [Wed, 13 May 2015 16:07:30 +0000 (17:07 +0100)]
portmanager: Add luacheck annotations

9 years agoutil.queue: Small fast FIFO/ringbuffer/queue library
Matthew Wild [Wed, 13 May 2015 15:57:27 +0000 (16:57 +0100)]
util.queue: Small fast FIFO/ringbuffer/queue library

9 years agosessionmanager: Rename argument to avoid name clash with local variable [luacheck]
Matthew Wild [Wed, 6 May 2015 18:58:33 +0000 (19:58 +0100)]
sessionmanager: Rename argument to avoid name clash with local variable [luacheck]

9 years agosessionmanager: Rename unused loop variables to '_' [luacheck]
Matthew Wild [Wed, 6 May 2015 18:58:03 +0000 (19:58 +0100)]
sessionmanager: Rename unused loop variables to '_' [luacheck]

9 years agoutil.set: Rename method argument to avoid name clash [luacheck]
Matthew Wild [Wed, 6 May 2015 18:51:35 +0000 (19:51 +0100)]
util.set: Rename method argument to avoid name clash [luacheck]

9 years agoutil.set: Add luacheck annotation for methods not referencing 'self'
Matthew Wild [Wed, 6 May 2015 18:51:07 +0000 (19:51 +0100)]
util.set: Add luacheck annotation for methods not referencing 'self'