mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-11-20 23:16:21 -05:00
ensure name is not for an existing interface, to prevent overwriting
This commit is contained in:
parent
8d8198b5f8
commit
a9dd80310c
1 changed files with 6 additions and 0 deletions
6
web.py
6
web.py
|
|
@ -257,6 +257,12 @@ class ReticulumWebChat:
|
|||
if "interfaces" in self.reticulum.config:
|
||||
interfaces = self.reticulum.config["interfaces"]
|
||||
|
||||
# ensure name is not for an existing interface, to prevent overwriting
|
||||
if interface_name in interfaces:
|
||||
return web.json_response({
|
||||
"message": "Name is already in use by another interface",
|
||||
}, status=422)
|
||||
|
||||
# create interface details
|
||||
interface_details = {
|
||||
"type": interface_type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue