Commit 621f913
authored
fix: harden clob download error handling (#235)
## Summary
- keep default blob/clob downloads on safe relative paths when IDs start
with `/` or `\`
- fix CLOB download/list scoped-read hint handling so HTTP failures
report the intended access hint
- avoid showing CDA credential-scope hints for local filesystem
write/path failures
- log the actual blob download path after extension detection
## Why
Blob and CLOB IDs can look like paths, but default downloads should
never write to filesystem root. Local destination failures should point
users toward `--dest`, while real CDA HTTP failures can still show
credential-scope guidance.
## Validation
- `poetry run pytest tests/commands/test_download_dest_safety.py
tests/commands/test_blob_upload.py tests/commands/test_clob.py -q`
- `poetry run pytest -q`
- `poetry check` (warnings only for existing Poetry metadata
deprecations)1 parent 1a3b26d commit 621f913
4 files changed
Lines changed: 72 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
616 | | - | |
| 616 | + | |
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
| 621 | + | |
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
| |||
36 | 51 | | |
37 | 52 | | |
38 | 53 | | |
39 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
40 | 59 | | |
41 | 60 | | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
| 64 | + | |
45 | 65 | | |
46 | 66 | | |
47 | 67 | | |
| |||
190 | 210 | | |
191 | 211 | | |
192 | 212 | | |
193 | | - | |
194 | | - | |
| 213 | + | |
| 214 | + | |
195 | 215 | | |
196 | 216 | | |
197 | 217 | | |
| |||
215 | 235 | | |
216 | 236 | | |
217 | 237 | | |
218 | | - | |
| 238 | + | |
219 | 239 | | |
220 | 240 | | |
221 | 241 | | |
222 | 242 | | |
223 | 243 | | |
224 | 244 | | |
225 | 245 | | |
226 | | - | |
| 246 | + | |
227 | 247 | | |
228 | 248 | | |
229 | 249 | | |
| |||
305 | 325 | | |
306 | 326 | | |
307 | 327 | | |
308 | | - | |
309 | | - | |
| 328 | + | |
| 329 | + | |
310 | 330 | | |
311 | 331 | | |
312 | 332 | | |
| |||
319 | 339 | | |
320 | 340 | | |
321 | 341 | | |
322 | | - | |
| 342 | + | |
323 | 343 | | |
324 | 344 | | |
325 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
310 | 350 | | |
311 | 351 | | |
312 | 352 | | |
| |||
0 commit comments