Commit 9fab01e
committed
test(supabase): track #7262 permitting a whitespace-only path component
#7262 landed 515b951, narrowing safeUrlPath's empty-segment check from
!segment.trim() to !segment — the fix this suite asked for after flagging the
over-rejection. Rebased onto it.
That changes behaviour under the Supabase storage key, so the suite is updated
rather than left asserting the old error text:
a/ /b -> a/%20/b (now permitted)
a//b -> rejects: empty path segment (unchanged)
The distinction is the point and both halves are now pinned. A component that
is a single space is a legal, nameable key component; a genuinely empty one
addresses a different object than the caller wrote. Collapsing them again in
either direction is a silent correctness change — one makes a real key
unreachable, the other retargets the request.1 parent 319724f commit 9fab01e
2 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
226 | 251 | | |
227 | 252 | | |
228 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
0 commit comments