diff --git a/webinterface/modules.py b/webinterface/modules.py index 9679e31c..33c9b8e8 100755 --- a/webinterface/modules.py +++ b/webinterface/modules.py @@ -112,6 +112,9 @@ async def add_module(request): form = dict(await request.form()) name = form.get("name", "") + if "/" in name: + return PlainTextResponse("Invalid module name provided.") + if name in config.mercure.modules: return PlainTextResponse("A module with this name already exists.") diff --git a/webinterface/templates/modules.html b/webinterface/templates/modules.html index 36acb9ed..51f2e014 100755 --- a/webinterface/templates/modules.html +++ b/webinterface/templates/modules.html @@ -73,7 +73,7 @@