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:
361bee3
)
luci-base: allow terminal '.' in hostname checks
author
Paul Donald
<redacted>
Tue, 22 Oct 2024 20:33:00 +0000
(22:33 +0200)
committer
Paul Donald
<redacted>
Tue, 22 Oct 2024 21:48:38 +0000
(23:48 +0200)
allowed in hostnames to represent the root of the DNS hierarchy
Signed-off-by: Paul Donald <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 5719031cb7475dde4b1a73def0602c46ece0949e..87f5f4b42c1c2efefbc98808110ab2e0c4caf1d5 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/validation.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/validation.js
@@
-394,7
+394,7
@@
var ValidatorFactory = baseclass.extend({
if (this.value.length <= 253)
return this.assert(
(this.value.match(/^[a-zA-Z0-9_]+$/) != null ||
- (this.value.match(/^[a-zA-Z0-9_][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$/) &&
+ (this.value.match(/^[a-zA-Z0-9_][a-zA-Z0-9_\-.]*[a-zA-Z0-9]
\.?
$/) &&
this.value.match(/[^0-9.]/))) &&
(!strict || !this.value.match(/^_/)),
_('valid hostname'));
git clone https://git.99rst.org/PROJECT