luci-mod-network: validate DHCP leasetime input master openwrt-24.10
authorLyall Beveridge <lyall.beveridge@morsemicro.com>
Thu, 5 Dec 2024 23:30:36 +0000 (10:30 +1100)
committerPaul Donald <newtwen+github@gmail.com>
Mon, 16 Dec 2024 20:55:31 +0000 (21:55 +0100)
commit8b3c13f7b3d9fcc02fcb5d6ae22b194a70340b02
tree4d1049f330151a1642c7446ab8ceb2f936f578ed
parentdd2c7f90b85686f7e4db3304a1017a55cd74c5ef
luci-mod-network: validate DHCP leasetime input

Without validation, `dnsmasq` can fail silently if users enter
invalid leasetime input. This change adds input validation to
align user input with the backend parsing logic. Whilst it does
not enforce the >120 seconds requirement, this is documented
in the field description and handled by `dnsmasq`'s `option.c`,
which adjusts values <120 to meet this minimum.

Signed-off-by: Lyall Beveridge <lyall.beveridge@morsemicro.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js