1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-03-17 20:57:54 +02:00

Allow subnet with host bit set in setup

This commit is contained in:
hoellen 2019-07-25 11:55:40 +02:00
parent 2788909a13
commit 463bbda302
2 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,7 @@ def build_app(path):
data = flask.request.form.copy()
data['uid'] = str(uuid.uuid4())
try:
data['dns'] = str(ipaddress.IPv4Network(data['subnet'])[-2])
data['dns'] = str(ipaddress.IPv4Network(data['subnet'], strict=False)[-2])
except ValueError as err:
return "Error while generating files: " + str(err)
db.set(data['uid'], json.dumps(data))

View File

@ -0,0 +1 @@
Allow subnet with host bit set in setup