Merge 0.10->trunk
authorKim Alvefur <zash@zash.se>
Tue, 04 Apr 2017 01:41:09 +0200
changeset 8063 71bdfdf6565d
parent 8054 b2681397bafa (current diff)
parent 8062 6a725b242804 (diff)
child 8068 36d9c1226fbc
Merge 0.10->trunk
--- a/plugins/mod_auth_anonymous.lua	Mon Apr 03 00:59:44 2017 +0200
+++ b/plugins/mod_auth_anonymous.lua	Tue Apr 04 01:41:09 2017 +0200
@@ -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";
--- a/plugins/mod_auth_cyrus.lua	Mon Apr 03 00:59:44 2017 +0200
+++ b/plugins/mod_auth_cyrus.lua	Tue Apr 04 01:41:09 2017 +0200
@@ -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");
 
--- a/plugins/mod_auth_internal_hashed.lua	Mon Apr 03 00:59:44 2017 +0200
+++ b/plugins/mod_auth_internal_hashed.lua	Tue Apr 04 01:41:09 2017 +0200
@@ -101,7 +101,10 @@
 	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)
@@ -110,10 +113,10 @@
 
 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
@@ -122,7 +125,8 @@
 				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;
--- a/plugins/mod_auth_internal_plain.lua	Mon Apr 03 00:59:44 2017 +0200
+++ b/plugins/mod_auth_internal_plain.lua	Tue Apr 04 01:41:09 2017 +0200
@@ -66,7 +66,7 @@
 
 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;
--- a/plugins/mod_storage_none.lua	Mon Apr 03 00:59:44 2017 +0200
+++ b/plugins/mod_storage_none.lua	Tue Apr 04 01:41:09 2017 +0200
@@ -1,8 +1,10 @@
+-- luacheck: ignore 212
+
 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);
@@ -23,4 +25,12 @@
 	return true;
 end
 
+function driver:append()
+	return nil, "Storage disabled";
+end
+
+function driver:find()
+	return function () end, 0;
+end
+
 module:provides("storage", driver);
--- a/plugins/mod_websocket.lua	Mon Apr 03 00:59:44 2017 +0200
+++ b/plugins/mod_websocket.lua	Tue Apr 04 01:41:09 2017 +0200
@@ -334,6 +334,7 @@
 		-- 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