usermanager, mod_saslauth: Default to internal_hashed if no auth module specified
authorMatthew Wild <mwild1@gmail.com>
Thu, 10 Feb 2022 19:54:14 +0000
changeset 12337 ed8a4f8dfd27
parent 12336 0d245034600a
child 12338 e621bb7bb623
usermanager, mod_saslauth: Default to internal_hashed if no auth module specified The default config was updated in this way long ago, but if no option was present in the config, Prosody would load internal_plain. This change can result in changes (for the better) for people using very old configuration files lacking an 'authentication' setting.
CHANGES
core/usermanager.lua
plugins/mod_saslauth.lua
--- a/CHANGES	Mon Feb 14 15:58:08 2022 +0000
+++ b/CHANGES	Thu Feb 10 19:54:14 2022 +0000
@@ -34,6 +34,7 @@
 -   Easy use of Mozilla TLS recommendations presets
 -   Unencrypted HTTP port (5280) restricted to loopback by default
 -   require_encryption options default to 'true' if unspecified
+-   Authentication module defaults to 'internal_hashed' if unspecified
 
 ### HTTP
 
--- a/core/usermanager.lua	Mon Feb 14 15:58:08 2022 +0000
+++ b/core/usermanager.lua	Thu Feb 10 19:54:14 2022 +0000
@@ -23,7 +23,7 @@
 
 local setmetatable = setmetatable;
 
-local default_provider = "internal_plain";
+local default_provider = "internal_hashed";
 
 local _ENV = nil;
 -- luacheck: std none
--- a/plugins/mod_saslauth.lua	Mon Feb 14 15:58:08 2022 +0000
+++ b/plugins/mod_saslauth.lua	Thu Feb 10 19:54:14 2022 +0000
@@ -309,7 +309,7 @@
 			return;
 		end
 
-		local authmod = module:get_option_string("authentication", "internal_plain");
+		local authmod = module:get_option_string("authentication", "internal_hashed");
 		if available_mechanisms:empty() then
 			log("warn", "No available SASL mechanisms, verify that the configured authentication module '%s' is loaded and configured correctly", authmod);
 			return;