summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-01-11 07:19:27 +0100
committerGitHub <noreply@github.com>2019-01-11 07:19:27 +0100
commite3fa766b587a1f8574a0aa979b9e41d9770b38e5 (patch)
treed832c4e0c5b2f1ea6a2a5b8037b08410329de3aa /modules
parent6f5525e4eed27add113891d021a68fb92cec2320 (diff)
parentf5a871bfe89871dbdcf430ae8c81e46c15c1424a (diff)
Merge pull request #2425 from cshoredaniel/pr-fix-ipaddrport-js
luci-base: Fix addr:port validate always fails
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index f93c9351a..67ddc6af3 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -443,10 +443,10 @@ var CBIValidatorPrototype = {
m6 = this.value.match((bracket == 1) ? /^\[(.+)\]:(\d+)$/ : /^([^\[\]]+):(\d+)$/);
if (m4)
- return this.assert(this.apply('ip4addr', m4[0], [true]) && this.apply('port', m4[1]),
+ return this.assert(this.apply('ip4addr', m4[1], [true]) && this.apply('port', m4[2]),
_('valid address:port'));
- return this.assert(m6 && this.apply('ip6addr', m6[0], [true]) && this.apply('port', m6[1]),
+ return this.assert(m6 && this.apply('ip6addr', m6[1], [true]) && this.apply('port', m6[2]),
_('valid address:port'));
},