git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
da7c3d9
)
luci-base: fix host validation function
author
Florian Eckert
<redacted>
Wed, 13 May 2020 09:57:38 +0000
(11:57 +0200)
committer
Florian Eckert
<redacted>
Tue, 19 May 2020 12:05:26 +0000
(14:05 +0200)
Allow only ipv4 or ipv6 addresses without IP mask.
A host IP with mask does not make sense in this context.
Signed-off-by: Florian Eckert <redacted>
modules/luci-base/htdocs/luci-static/resources/validation.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/validation.js
b/modules/luci-base/htdocs/luci-static/resources/validation.js
index eea837d64ee5c77a53c711ac31035d132f7ab4da..02d7dbc37fd0402dd731f7da6bb5cdc7586fdb55 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/validation.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/validation.js
@@
-337,7
+337,7
@@
var ValidatorFactory = baseclass.extend({
},
host: function(ipv4only) {
- return this.assert(this.apply('hostname') || this.apply(ipv4only == 1 ? 'ip4addr' : 'ipaddr'),
+ return this.assert(this.apply('hostname') || this.apply(ipv4only == 1 ? 'ip4addr' : 'ipaddr'
, null, ['nomask']
),
_('valid hostname or IP address'));
},
git clone https://git.99rst.org/PROJECT