From 489279bb9a4d9984315bc0e0f97a56fea800bbcd Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Sat, 12 Feb 2011 19:39:54 +0000 Subject: web: Relax hostname validation for length --- libs/web/luasrc/cbi/datatypes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/web/luasrc') diff --git a/libs/web/luasrc/cbi/datatypes.lua b/libs/web/luasrc/cbi/datatypes.lua index d1ac8f405..58b54de6e 100644 --- a/libs/web/luasrc/cbi/datatypes.lua +++ b/libs/web/luasrc/cbi/datatypes.lua @@ -127,7 +127,7 @@ function macaddr(val) end function hostname(val) - if val and (#val < 25) and val.match(val, "^[a-zA-Z0-9][a-zA-Z0-9%-%.]*[a-zA-Z0-9]$") then + if val and (#val < 254) and val.match(val, "^[a-zA-Z0-9][a-zA-Z0-9%-%.]*[a-zA-Z0-9]$") then return true end return false -- cgit v1.2.3