9

How does MongoDB address SQL or Query injection? explains how to handle query injection with BSON when using javascript on the server. I haven't been able to track down how/whether Mongoose handles query injection though.

At this point I have two questions:

  1. Does Mongoose protect against query injection (using BSON or some other method)
  2. If it does, are there any quirks with it's implementation that a developer need to be aware of?
4

1 回答 1

3

Mongoose 不能防止查询注入,因此很遗憾,您需要按照上面链接中的指南执行自己的注入检测。

于 2013-08-26T08:35:19.410 回答