Skip to content

Commit 6ba21b5

Browse files
committed
🐛 Remove check for collection names length == 64
1 parent 8e59701 commit 6ba21b5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

commons/src/main/java/org/restheart/exchange/MongoRequest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ public boolean isDbNameInvalidOnWindows(String dbName) {
12211221
}
12221222

12231223
/**
1224-
* Seehttps://docs.mongodb.org/v3.2/reference/limits/#naming-restrictions
1224+
* See https://www.mongodb.com/docs/manual/reference/limits/#naming-restrictions
12251225
*
12261226
* @return
12271227
*/
@@ -1231,16 +1231,12 @@ public boolean isCollectionNameInvalid() {
12311231

12321232
/**
12331233
* @param collectionName
1234-
* Seehttps://docs.mongodb.org/v3.2/reference/limits/#naming-restrictions
1234+
* See https://www.mongodb.com/docs/manual/reference/limits/#naming-restrictions
12351235
* @return
12361236
*/
12371237
public boolean isCollectionNameInvalid(String collectionName) {
12381238
// collection starting with system. will return FORBIDDEN
1239-
1240-
return (collectionName == null
1241-
|| collectionName.contains(NUL)
1242-
|| collectionName.contains("$")
1243-
|| collectionName.length() == 64);
1239+
return (collectionName == null || collectionName.contains(NUL) || collectionName.contains("$"));
12441240
}
12451241

12461242
/**

0 commit comments

Comments
 (0)