# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1704734919 0
# Node ID d3b69859553a0d168e53862f83fc4fe883fa02bf
# Parent  7905766d01f6d339a6389479ada38f6abbacd5a6
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.

diff -r 7905766d01f6 -r d3b69859553a 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