Skip to content

Commit

Permalink
luci-base: Code quality fixes
Browse files Browse the repository at this point in the history
reduce backtracking in regex

Signed-off-by: Paul Donald <newtwen@gmail.com>
  • Loading branch information
systemcrash committed Jan 31, 2024
1 parent d46da53 commit 2dc1fcc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
},

Expand Down

0 comments on commit 2dc1fcc

Please sign in to comment.