diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-10-06 23:10:43 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-10-06 23:10:43 +0000 |
commit | c802c941cb5892ac43ee865594d3e06b60c00ace (patch) | |
tree | 44848ec9cebea1193c33ec6990dff6adf83615f0 /libs/web/htdocs | |
parent | 9939dd2f72f42e547b6ad4cd3c9c068516fa0113 (diff) |
libs/web: relax validation for hostnames to allow names like _kerberos._udp.EXAMPLE.COM
Diffstat (limited to 'libs/web/htdocs')
-rw-r--r-- | libs/web/htdocs/luci-static/resources/cbi.js | 4 |
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 b07215cbc..d8719c4b9 100644 --- a/libs/web/htdocs/luci-static/resources/cbi.js +++ b/libs/web/htdocs/luci-static/resources/cbi.js @@ -148,8 +148,8 @@ var cbi_validators = { 'hostname': function() { if (this.length <= 253) - return (this.match(/^[a-zA-Z]+$/) != null || - (this.match(/^[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]$/) && + return (this.match(/^[a-zA-Z0-9]+$/) != null || + (this.match(/^[a-zA-Z0-9_][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$/) && this.match(/[^0-9.]/))); return false; |