File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,16 @@ ExportAdapter.prototype.connect = function() {
44
44
45
45
// Returns a promise for a Mongo collection.
46
46
// Generally just for internal use.
47
+ var joinRegex = / ^ _ J o i n : [ A - Z a - z 0 - 9 _ ] + : [ A - Z a - z 0 - 9 _ ] + / ;
48
+ var otherRegex = / ^ [ A - Z a - z ] [ A - Z a - z 0 - 9 _ ] * $ / ;
47
49
ExportAdapter . prototype . collection = function ( className ) {
48
50
if ( className !== '_User' &&
49
51
className !== '_Installation' &&
50
52
className !== '_Session' &&
51
53
className !== '_SCHEMA' &&
52
54
className !== '_Role' &&
53
- ! className . match ( / ^ _ J o i n : [ A - Z a - z 0 - 9 _ ] + : [ A - Z a - z 0 - 9 _ ] + / ) &&
54
- ! className . match ( / ^ [ A - Z a - z ] [ A - Z a - z 0 - 9 _ ] * $ / ) ) {
55
+ ! joinRegex . test ( className ) &&
56
+ ! otherRegex . test ( className ) ) {
55
57
throw new Parse . Error ( Parse . Error . INVALID_CLASS_NAME ,
56
58
'invalid className: ' + className ) ;
57
59
}
You can’t perform that action at this time.
0 commit comments