Commit 475eb21
committed
refactor(tools): use #7262's strictUrlPathSegment and delete the local copy
#7262 landed d2c74d7, defining strictUrlPathSegment and
strictEncodedUrlPathSegment in url-path.ts to refuse padded identifiers on
state-changing requests. That is the rule this branch introduced locally while
the two PRs were in flight, so the duplication collapses now that the rebase
brings it in: tools/strict-url-path.ts is deleted and its four consumers import
from @/tools/url-path.
Their assertUnpadded is slightly better than the local version — an all-whitespace
value falls through to safeUrlPathSegment and reports "is required" rather than
a padding error, which names the real problem. strictCanonicalBigQueryId now
derives from their guard too, so the body value and the path value share one
rule rather than two.
The error text changed from "cannot have" to "must not have leading or trailing
whitespace", and four assertions failed on the rebase because they pin the exact
text. They are updated to the new wording rather than loosened — that precision
is the property that caught this and two earlier upstream changes.1 parent 990a967 commit 475eb21
8 files changed
Lines changed: 9 additions & 77 deletions
File tree
- apps/sim/tools
- __tests__
- box_sign
- google_bigquery
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | | - | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
This file was deleted.
0 commit comments