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:
d46da53
)
luci-base: Code quality fixes
author
Paul Donald
<redacted>
Wed, 31 Jan 2024 01:04:27 +0000
(
02:04
+0100)
committer
Paul Donald
<redacted>
Wed, 31 Jan 2024 01:55:13 +0000
(
02:55
+0100)
reduce backtracking in regex
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 791a84823d4c1ec49157bb22e6165bdc01842d81..9504e7f2c42678777a20392f6ee332c95f84d9b9 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/validation.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/validation.js
@@
-589,7
+589,7
@@
var ValidatorFactory = baseclass.extend({
},
hexstring: function() {
- return this.assert(this.value.match(/^([
a-f0-9][a-f0-9]|[A-F0-9][A-F0-9])+$/
),
+ return this.assert(this.value.match(/^([
A-F0-9]{2})+$/i
),
_('hexadecimal encoded value'));
},
git clone https://git.99rst.org/PROJECT