summaryrefslogtreecommitdiffhomepage
path: root/libs/web/htdocs/luci-static/resources/cbi.js
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2011-02-12 11:09:13 +0000
committerManuel Munz <freifunk@somakoma.de>2011-02-12 11:09:13 +0000
commit408a58f6f6b0d419bc6b81eb93f32c701e19118a (patch)
tree1f719c3aa68b99dd3768dedb499bf827d8afcb8f /libs/web/htdocs/luci-static/resources/cbi.js
parent2b72c2093fa76e94bc249cba52c9b5b8b207e06e (diff)
web: Improve hostname validation
Diffstat (limited to 'libs/web/htdocs/luci-static/resources/cbi.js')
-rw-r--r--libs/web/htdocs/luci-static/resources/cbi.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js
index 44a5b2aec7..d12d050a8a 100644
--- a/libs/web/htdocs/luci-static/resources/cbi.js
+++ b/libs/web/htdocs/luci-static/resources/cbi.js
@@ -141,8 +141,8 @@ var cbi_validators = {
},
'hostname': function(v)
- {
- return (v.match(/^[a-zA-Z_][a-zA-Z0-9_\-.]*$/) != null);
+ { if ( v.length <= 24 )
+ return (v.match(/^[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]$/) != null);
},
'wpakey': function(v)