|
79 | 79 | {
|
80 | 80 | "description": "Document truncated mid-key",
|
81 | 81 | "bson": "1200000002666F"
|
| 82 | + }, |
| 83 | + { |
| 84 | + "description": "Null byte in document key", |
| 85 | + "bson": "0D000000107800000100000000" |
82 | 86 | }
|
83 | 87 | ],
|
84 | 88 | "parseErrors": [
|
|
92 | 96 | },
|
93 | 97 | {
|
94 | 98 | "description": "Bad $regularExpression (pattern is number, not string)",
|
95 |
| - "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": 42, \"$options\" : \"\"}}}" |
| 99 | + "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": 42, \"options\" : \"\"}}}" |
96 | 100 | },
|
97 | 101 | {
|
98 | 102 | "description": "Bad $regularExpression (options are number, not string)",
|
99 |
| - "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": \"a\", \"$options\" : 0}}}" |
| 103 | + "string": "{\"x\" : {\"$regularExpression\" : { \"pattern\": \"a\", \"options\" : 0}}}" |
100 | 104 | },
|
101 | 105 | {
|
102 | 106 | "description" : "Bad $regularExpression (missing pattern field)",
|
|
241 | 245 | {
|
242 | 246 | "description": "Bad DBpointer (extra field)",
|
243 | 247 | "string": "{\"a\": {\"$dbPointer\": {\"a\": {\"$numberInt\": \"1\"}, \"$id\": {\"$oid\": \"56e1fc72e0c917e9c4714161\"}, \"c\": {\"$numberInt\": \"2\"}, \"$ref\": \"b\"}}}"
|
| 248 | + }, |
| 249 | + { |
| 250 | + "description" : "Null byte in document key", |
| 251 | + "string" : "{\"a\\u0000\": 1 }" |
| 252 | + }, |
| 253 | + { |
| 254 | + "description" : "Null byte in sub-document key", |
| 255 | + "string" : "{\"a\" : {\"b\\u0000\": 1 }}" |
| 256 | + }, |
| 257 | + { |
| 258 | + "description": "Null byte in $regularExpression pattern", |
| 259 | + "string": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"b\\u0000\", \"options\" : \"i\"}}}" |
| 260 | + }, |
| 261 | + { |
| 262 | + "description": "Null byte in $regularExpression options", |
| 263 | + "string": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"b\", \"options\" : \"i\\u0000\"}}}" |
244 | 264 | }
|
245 |
| - |
246 | 265 | ]
|
247 | 266 | }
|
0 commit comments