Coerce values to string before using validator methods

This commit is contained in:
Berkeley Martinez
2016-03-13 18:04:24 -07:00
parent cf4b862c4c
commit e657b96dbc
3 changed files with 7 additions and 7 deletions

View File

@@ -431,7 +431,7 @@ module.exports = function(app) {
challengeId = badIdMap[challengeId];
}
if (!isMongoId(challengeId)) {
if (!isMongoId('' + challengeId)) {
challengeId = null;
}
@@ -456,7 +456,7 @@ module.exports = function(app) {
challengeId = badIdMap[challengeId];
}
if (!isMongoId(challengeId)) {
if (!isMongoId('' + challengeId)) {
challengeId = null;
}