Mercurial > prosody-modules
comparison mod_password_policy/mod_password_policy.lua @ 5818:d3b69859553a
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.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 08 Jan 2024 17:28:39 +0000 |
parents | bfd4af4caddc |
children |
comparison
equal
deleted
inserted
replaced
5817:7905766d01f6 | 5818:d3b69859553a |
---|---|
98 for _,password in ipairs(passwords) do | 98 for _,password in ipairs(passwords) do |
99 if password then | 99 if password then |
100 local pw_ok, pw_err, pw_failed_policy = check_password(password, additional_info); | 100 local pw_ok, pw_err, pw_failed_policy = check_password(password, additional_info); |
101 if not pw_ok then | 101 if not pw_ok then |
102 module:log("debug", "Password failed check against '%s' policy", pw_failed_policy); | 102 module:log("debug", "Password failed check against '%s' policy", pw_failed_policy); |
103 origin.send(st.error_reply(stanza, "cancel", "not-acceptable", pw_err)); | 103 origin.send(st.error_reply(stanza, "modify", "not-acceptable", pw_err)); |
104 return true; | 104 return true; |
105 end | 105 end |
106 end | 106 end |
107 end | 107 end |
108 end | 108 end |