Is it really not necessary to filter the POST entries with MongoDB?

时间:2017-06-15 09:51:31

标签: mongodb mongodb-java

In a complicated paging process with next/previous pages, I retrieve an additional filter to insert into my initial query filter.

Document filter = filter(...);
filter = Filters.and(filter, new Document(req.getParameter("paging")));
List results = MongoDb.aggregate(new Document("$match", filter),
                                            new Document("$limit", ...

"paging" is complete representation of a MongoDB filter ($and, $or ...) converted into a document.

Because I'm using $and I'm sure that the query will not get out of the first filter.

Please, is it really secure?

0 个答案:

没有答案