summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-ffwizard
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-ffwizard')
-rw-r--r--applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua b/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua
index 0cc26e592..73ec41e7e 100644
--- a/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua
+++ b/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua
@@ -121,9 +121,7 @@ function hostname.write(self, section, value)
uci:save("freifunk")
end
function hostname.validate(self, value)
- if (#value > 16) then
- return
- elseif (string.find(value, "[^%w%_%-]")) then
+ if (#value > 24) or string.find(value, "[^%w%.%-]") or string.find(string.sub(value, value:len()), "[%.%-]") or string.find(string.sub(value, 1), "[%.%-]") then
return
else
return value