Fix #18325 - Forbid non valid hex chars following valid hex chars

Ref: 11421b4b05

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2023-07-14 18:12:34 +02:00
parent 11421b4b05
commit 298a7b5d2a
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -187,7 +187,7 @@ function verifyAfterSearchFieldChange (index, searchFormId) {
// validator method for INTs
// See all possible syntaxes in tests of https://regexr.com/7h1ci
jQuery.validator.addMethod('validationFunctionForInt', function (value) {
return value.match(/^(0x[0-9a-f]+)|([+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?)$/i) !== null;
return value.match(/^(0x[0-9a-f]+$)|([+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?)$/i) !== null;
},
Messages.strEnterValidNumber
);