From 221809ea04f86bcf1ebdfd09364864898bf66efb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 3 Apr 2017 17:14:34 +0200 Subject: mod_websocket: Log state of cross domain set after changing it --- plugins/mod_websocket.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index 3c96f780..d545e708 100644 --- a/plugins/mod_websocket.lua +++ b/plugins/mod_websocket.lua @@ -334,6 +334,7 @@ function module.add_host(module) -- This might be weird with random load order local_cross_domain:exclude(cross_domain); cross_domain:include(local_cross_domain); + module:log("debug", "cross_domain = %s", cross_domain); function module.unload() cross_domain:exclude(local_cross_domain); end -- cgit v1.2.3 From 9db373e4f91cb8350f1ff0f7599e49a236f064fc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Apr 2017 01:25:10 +0200 Subject: mod_auth_anonymous: Ignore unused arguments to various not actually implemented functions [luacheck] --- plugins/mod_auth_anonymous.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua index 8de46f8c..1f2bceb3 100644 --- a/plugins/mod_auth_anonymous.lua +++ b/plugins/mod_auth_anonymous.lua @@ -5,6 +5,7 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- +-- luacheck: ignore 212 local new_sasl = require "util.sasl".new; local datamanager = require "util.datamanager"; -- cgit v1.2.3 From 244acd81f41c3bed1454242df2ace00bf71451b4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Apr 2017 01:25:33 +0200 Subject: mod_auth_cyrus: Ignore unused arguments to various not actually implemented functions [luacheck] --- plugins/mod_auth_cyrus.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/mod_auth_cyrus.lua b/plugins/mod_auth_cyrus.lua index 7668f8c4..0debc287 100644 --- a/plugins/mod_auth_cyrus.lua +++ b/plugins/mod_auth_cyrus.lua @@ -5,6 +5,7 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- +-- luacheck: ignore 212 local log = require "util.logger".init("auth_cyrus"); -- cgit v1.2.3 From 5386166909493c4850493128d24129877cea95eb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Apr 2017 01:26:09 +0200 Subject: mod_auth_internal_hashed: Rename unused 'self' to _ [luacheck] --- plugins/mod_auth_internal_hashed.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index 78abe50d..3dfe90ad 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -110,10 +110,10 @@ end function provider.get_sasl_handler() local testpass_authentication_profile = { - plain_test = function(sasl, username, password, realm) + plain_test = function(_, username, password, realm) return usermanager.test_password(username, realm, password), true; end, - scram_sha_1 = function(sasl, username, realm) + scram_sha_1 = function(_, username) local credentials = accounts:get(username); if not credentials then return; end if credentials.password then -- cgit v1.2.3 From 4234f60c4a8e19856674fa48f87f2feca80de33a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Apr 2017 01:26:26 +0200 Subject: mod_auth_internal_hashed: Split long lines [luacheck] --- plugins/mod_auth_internal_hashed.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index 3dfe90ad..53e345e5 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -101,7 +101,10 @@ function provider.create_user(username, password) local valid, stored_key, server_key = getAuthenticationDatabaseSHA1(password, salt, default_iteration_count); local stored_key_hex = to_hex(stored_key); local server_key_hex = to_hex(server_key); - return accounts:set(username, {stored_key = stored_key_hex, server_key = server_key_hex, salt = salt, iteration_count = default_iteration_count}); + return accounts:set(username, { + stored_key = stored_key_hex, server_key = server_key_hex, + salt = salt, iteration_count = default_iteration_count + }); end function provider.delete_user(username) @@ -122,7 +125,8 @@ function provider.get_sasl_handler() if not credentials then return; end end - local stored_key, server_key, iteration_count, salt = credentials.stored_key, credentials.server_key, credentials.iteration_count, credentials.salt; + local stored_key, server_key = credentials.stored_key, credentials.server_key; + local iteration_count, salt = credentials.iteration_count, credentials.salt; stored_key = stored_key and from_hex(stored_key); server_key = server_key and from_hex(server_key); return stored_key, server_key, iteration_count, salt, true; -- cgit v1.2.3 From 6132b1f72e57a5250bae29cca2f5831185a2c2c9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Apr 2017 01:26:33 +0200 Subject: mod_auth_internal_plain: Rename unused self argument [luacheck] --- plugins/mod_auth_internal_plain.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_auth_internal_plain.lua b/plugins/mod_auth_internal_plain.lua index db528432..276efb64 100644 --- a/plugins/mod_auth_internal_plain.lua +++ b/plugins/mod_auth_internal_plain.lua @@ -66,7 +66,7 @@ end function provider.get_sasl_handler() local getpass_authentication_profile = { - plain = function(sasl, username, realm) + plain = function(_, username, realm) local password = usermanager.get_password(username, realm); if not password then return "", nil; -- cgit v1.2.3 From aa0ceacdb380321f54f3b1e7a7ff79fb495f7611 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Apr 2017 01:30:00 +0200 Subject: mod_storage_none: Ignore unused arguments [luacheck] --- plugins/mod_storage_none.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_storage_none.lua b/plugins/mod_storage_none.lua index fa925b76..f1692cb8 100644 --- a/plugins/mod_storage_none.lua +++ b/plugins/mod_storage_none.lua @@ -1,3 +1,5 @@ +-- luacheck: ignore 212 + local driver = {}; local driver_mt = { __index = driver }; -- cgit v1.2.3 From f94c56040c088f63efdcab886d8ffc311d2e4359 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Apr 2017 01:31:51 +0200 Subject: mod_storage_none: Add allways empty archive storage --- plugins/mod_storage_none.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_storage_none.lua b/plugins/mod_storage_none.lua index f1692cb8..770b2832 100644 --- a/plugins/mod_storage_none.lua +++ b/plugins/mod_storage_none.lua @@ -4,7 +4,7 @@ local driver = {}; local driver_mt = { __index = driver }; function driver:open(store, typ) - if typ and typ ~= "keyval" then + if typ and typ ~= "keyval" and typ ~= "archive" then return nil, "unsupported-store"; end return setmetatable({ store = store, type = typ }, driver_mt); @@ -25,4 +25,12 @@ function driver:purge(user) return true; end +function driver:append() + return nil, "Storage disabled"; +end + +function driver:find() + return function () end, 0; +end + module:provides("storage", driver); -- cgit v1.2.3