Software /
code /
prosody-modules
Changeset
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 | 5537:4b9a7684ae02 |
children | 5539:fa8435a27f7e |
files | mod_firewall/actions.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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)