@procedures/client 0.27.8 → 0.28.0
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/CHANGELOG.md +18 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/procedures/collection/query.d.ts.map +1 -1
- package/dist/procedures/collection/query.js +7 -52
- package/dist/procedures/collection/query.js.map +1 -1
- package/dist/procedures/collection/regex-guard.d.ts +18 -0
- package/dist/procedures/collection/regex-guard.d.ts.map +1 -0
- package/dist/procedures/collection/regex-guard.js +337 -0
- package/dist/procedures/collection/regex-guard.js.map +1 -0
- package/package.json +1 -1
- package/src/procedures/collection/query.ts +7 -48
- package/src/procedures/collection/regex-guard.ts +333 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @procedures/client
|
|
2
2
|
|
|
3
|
+
## 0.28.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 06694d7: The guard of `$regex` refuses more patterns that can take an exponential time (roadmap O56, audit finding 11).
|
|
8
|
+
|
|
9
|
+
MINOR: a break (decision D33b). 0.27.8 gave the notice. A host that turned `$regex` on with a `queryPolicy` can now get `VALIDATION_ERROR` for a pattern that passed before. The default policy does not permit `$regex`, so a host without a `queryPolicy` sees no change.
|
|
10
|
+
|
|
11
|
+
Before, the guard refused only a repeated group with an unbounded repetition inside, for example `(a+)+`. V8 still took an exponential time for `(a|a)*$`, `(a|aa)+$`, `(a{2,3})+` and `(a{1,50}){1,50}`. Now a group that repeats more than one time is refused when it can match the same text in more than one way:
|
|
12
|
+
|
|
13
|
+
- It holds a repetition without a bound, for example `(a+)+`, and now also `(a+){9}` and `(\w+\s){2}`. The reason stays "repeats a group that repeats without a bound".
|
|
14
|
+
- It holds a repetition of variable length, for example `(a{2,3})+` or `(a?a?)+`. The reason is "repeats a group with a repetition of variable length".
|
|
15
|
+
- It holds alternatives that can start with the same character, for example `(a|aa)+` or `(\d|\w)+`. With the flag `i`, `a` and `A` are the same character. The reason is "repeats a group with alternatives that can start with the same character".
|
|
16
|
+
|
|
17
|
+
A bounded repetition with at most 1000 ways to match passes, for example `(\d{1,3}\.){3}`. Alternatives that start with different characters pass, for example `(?:foo|bar)+` and `(?:[a-z]|-)+`.
|
|
18
|
+
|
|
19
|
+
Migration: the site, MiniMongo, Graph and jarvis do not turn `$regex` on, so they need no change. A host that turns it on and gets the new `VALIDATION_ERROR` writes the pattern without the ambiguity. For example, write `(?:a|b)+` for `(a|ab|b)+`, and write the repetitions out, `\w+\s\w+\s` for `(\w+\s){2}`.
|
|
20
|
+
|
|
3
21
|
## 0.27.8
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|