Skip to content

Commit e310a87

Browse files
committed
Additional stuff for #557
1 parent 830873e commit e310a87

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#### HEAD
2+
3+
- Added an `isMD5()` validator
4+
([#557](https://github.com/chriso/validator.js/pull/557))
5+
16
#### 5.5.0
27

38
- Fixed a regex denial of service in `trim()` and `rtrim()`

lib/isMD5.js

-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ var _assertString2 = _interopRequireDefault(_assertString);
1111

1212
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1313

14-
/* eslint-disable no-control-regex */
1514
var md5 = /^[a-f0-9]{32}$/;
16-
/* eslint-enable no-control-regex */
1715

1816
function isMD5(str) {
1917
(0, _assertString2.default)(str);

validator.js

-2
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,7 @@
563563
return hexcolor.test(str);
564564
}
565565

566-
/* eslint-disable no-control-regex */
567566
var md5 = /^[a-f0-9]{32}$/;
568-
/* eslint-enable no-control-regex */
569567

570568
function isMD5(str) {
571569
assertString(str);

0 commit comments

Comments
 (0)