Move $options validation into Parse Server

This commit is contained in:
Drew Gross
2016-06-13 01:14:26 -07:00
parent 452b737be4
commit f796d69d19
3 changed files with 9 additions and 8 deletions

View File

@@ -517,13 +517,7 @@ function transformConstraint(constraint, inArray) {
break;
case '$options':
var options = constraint[key];
if (!answer['$regex'] || (typeof options !== 'string')
|| !options.match(/^[imxs]+$/)) {
throw new Parse.Error(Parse.Error.INVALID_QUERY,
'got a bad $options');
}
answer[key] = options;
answer[key] = constraint[key];
break;
case '$nearSphere':