mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
email_server: action: Add argument type checking for extra safety
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
ce3668d5e8
commit
fb47f35e87
@ -54,6 +54,11 @@ def _call(module_name, action_name, arguments):
|
||||
logger.critical('Bad action: %s/%r', module_name, action_name)
|
||||
sys.exit(EXIT_SYNTAX)
|
||||
|
||||
for argument in arguments:
|
||||
if not isinstance(argument, str):
|
||||
logger.critical('Bad argument: %s', argument)
|
||||
sys.exit(EXIT_SYNTAX)
|
||||
|
||||
action(*arguments)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user