Mercurial > prosody-modules
diff mod_firewall/actions.lib.lua @ 5538:40f8b9cc2065
mod_firewall: Improve error when mark name contains invalid characters
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 08 Jun 2023 16:59:22 +0100 |
parents | 4b9a7684ae02 |
children | 1249ab2f797c |
line wrap: on
line diff
--- a/mod_firewall/actions.lib.lua Thu Jun 08 16:53:12 2023 +0100 +++ b/mod_firewall/actions.lib.lua Thu Jun 08 16:59:22 2023 +0100 @@ -225,7 +225,7 @@ mark = %q; timestamp = current_timestamp; }); - ]]):format(idsafe(name)), { "timestamp" }; + ]]):format(assert(idsafe(name), "Invalid characters in mark name: "..name)), { "timestamp" }; end function action_handlers.UNMARK_USER(name) @@ -233,7 +233,7 @@ username = session.username; mark = %q; }); - ]]):format(idsafe(name)); + ]]):format(assert(idsafe(name), "Invalid characters in mark name: "..name)); end function action_handlers.ADD_TO(spec)