mod_password_policy: Change error type from 'cancel' to 'modify'
authorMatthew Wild <mwild1@gmail.com>
Mon, 08 Jan 2024 17:28:39 +0000
changeset 5822 d3b69859553a
parent 5821 7905766d01f6
child 5823 bb51cf204dd4
mod_password_policy: Change error type from 'cancel' to 'modify' This makes more sense, as the problem relates to the data that has been entered, and therefore the request could be retried with different data.
mod_password_policy/mod_password_policy.lua
--- a/mod_password_policy/mod_password_policy.lua	Mon Jan 08 15:56:11 2024 +0000
+++ b/mod_password_policy/mod_password_policy.lua	Mon Jan 08 17:28:39 2024 +0000
@@ -100,7 +100,7 @@
 				local pw_ok, pw_err, pw_failed_policy = check_password(password, additional_info);
 				if not pw_ok then
 					module:log("debug", "Password failed check against '%s' policy", pw_failed_policy);
-					origin.send(st.error_reply(stanza, "cancel", "not-acceptable", pw_err));
+					origin.send(st.error_reply(stanza, "modify", "not-acceptable", pw_err));
 					return true;
 				end
 			end