Catch invalid input in device creation, fixing #8

This commit is contained in:
Kumi 2019-02-19 14:47:45 +00:00
parent 8f663d69d3
commit 4d03bf7427

View file

@ -471,7 +471,7 @@ def makedevice(request):
CONFIGDIR = "/etc/openvpn/client-configs/"
BEFORE = os.getcwd()
device_serial = request.POST.get("serial", "")
device_serial = request.POST.get("serial", "").replace(" ", "_")
device_name = request.POST.get("name", "")
device_organization = request.POST.get("organization", "")
device_model = request.POST.get("model", "")