Development

This commit is contained in:
Matthew Grotke 2026-05-20 17:10:18 -04:00
parent 270856b391
commit 2bfa5ff29a
18 changed files with 814 additions and 565 deletions

View file

@ -4,6 +4,7 @@ from flask import Blueprint, request, redirect, flash
from auth import require_level
from config_utils import verify_core_hash, queued_msg, queue_command
import sanitize
import validation as validate
bp = Blueprint('action_apply_iface_config', __name__)
@ -47,11 +48,8 @@ def apply_iface_config():
mtu_int = None
if mtu:
try:
mtu_int = int(mtu)
if not (68 <= mtu_int <= 9000):
raise ValueError
except ValueError:
mtu_int = validate.int_range(mtu, 68, 9000)
if mtu_int is None:
flash('MTU must be an integer between 68 and 9000.', 'error')
return redirect(_VIEW)