mongoose 7.8.12 → 7.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/query.d.ts CHANGED
@@ -146,7 +146,15 @@ declare module 'mongoose' {
146
146
  * (https://mongoosejs.com/docs/validation.html#update-validators). Defaults to false.
147
147
  */
148
148
  runValidators?: boolean;
149
- /* Set to `true` to automatically sanitize potentially unsafe user-generated query projections */
149
+ /**
150
+ * Set to `true` to automatically sanitize potentially unsafe user-generated query projections.
151
+ * Converts projection values that aren't numbers or booleans to `1`, including strings like `'$password'`
152
+ * and expressions like `{ $concat: ['$password'] }`, so projections can't copy one field's value into another.
153
+ * The only projection operators that are allowed are `$elemMatch`, `$slice` with numbers, and `$meta: 'textScore'`.
154
+ *
155
+ * In Mongoose 7, `sanitizeProjection` does **not** prevent projecting in fields that the schema deselects
156
+ * with `select: false`: `select('+password')` and `select({ password: 1 })` still include `password`.
157
+ */
150
158
  sanitizeProjection?: boolean;
151
159
  /**
152
160
  * Set to `true` to automatically sanitize potentially unsafe query filters by stripping out query selectors that
package/deno.lock DELETED
@@ -1,61 +0,0 @@
1
- {
2
- "version": "5",
3
- "redirects": {
4
- "https://deno.land/std/flags/mod.ts": "https://deno.land/std@0.224.0/flags/mod.ts"
5
- },
6
- "remote": {
7
- "https://deno.land/std@0.224.0/assert/assert_exists.ts": "43420cf7f956748ae6ed1230646567b3593cb7a36c5a5327269279c870c5ddfd",
8
- "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917",
9
- "https://deno.land/std@0.224.0/flags/mod.ts": "88553267f34519c8982212185339efdb2d2e62c159ec558f47eb50c8952a6be3"
10
- },
11
- "workspace": {
12
- "packageJson": {
13
- "dependencies": [
14
- "npm:@ark/attest@0.56.3",
15
- "npm:@eslint/js@^9.39.3",
16
- "npm:@mongodb-js/mongodb-downloader@1",
17
- "npm:@standard-schema/spec@^1.1.0",
18
- "npm:@types/node@^20.19.0",
19
- "npm:acquit-ignore@0.2.2",
20
- "npm:acquit-require@0.1.1",
21
- "npm:acquit@1.4.0",
22
- "npm:ajv@8.20.0",
23
- "npm:c8@11.0.0",
24
- "npm:cheerio@1.2.0",
25
- "npm:dox@1.0.0",
26
- "npm:eslint-plugin-mocha-no-only@1.2.0",
27
- "npm:eslint@10.8.0",
28
- "npm:express@5.2.1",
29
- "npm:fs-extra@11.4",
30
- "npm:glob@^13.0.6",
31
- "npm:globals@^17.4.0",
32
- "npm:highlight.js@11.11.1",
33
- "npm:kareem@3.3.0",
34
- "npm:linkinator@8",
35
- "npm:lodash.isequal@4.5.0",
36
- "npm:lodash.isequalwith@4.4.0",
37
- "npm:markdownlint-cli2@0.23.2",
38
- "npm:marked@18.0.7",
39
- "npm:mkdirp@^3.0.1",
40
- "npm:mocha@12.0.0-rc.5",
41
- "npm:moment@2.30.1",
42
- "npm:mongodb-client-encryption@^7.2.0",
43
- "npm:mongodb-memory-server@11.2.0",
44
- "npm:mongodb-runner@6",
45
- "npm:mongodb@7.5",
46
- "npm:mpath@0.9.0",
47
- "npm:mquery@6.0.0",
48
- "npm:ms@2.1.3",
49
- "npm:ncp@2",
50
- "npm:pug@3.0.4",
51
- "npm:sift@17.1.3",
52
- "npm:sinon@22.1.0",
53
- "npm:tstyche@7",
54
- "npm:typescript-eslint@^8.31.1",
55
- "npm:typescript@5.9.3",
56
- "npm:uuid@14.0.1",
57
- "npm:xss@1.0.15"
58
- ]
59
- }
60
- }
61
- }