Commit f5748c3
committed
fix(taskfile): verify the pinned checksum on remote cache hits
A cache hit returned the cached Taskfile straight away, without ever
comparing it to the checksum pinned on the include. The pin was only
ever checked against freshly downloaded bytes, so a tampered cache entry
bypassed it entirely. The same applies to the offline and cancelled
download paths.
A timestamp dated in the future also kept an entry valid past any expiry
duration, since nothing bounded the value read back from disk.1 parent 4c144fe commit f5748c3
1 file changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
473 | 485 | | |
474 | 486 | | |
475 | 487 | | |
476 | 488 | | |
477 | 489 | | |
478 | | - | |
| 490 | + | |
479 | 491 | | |
480 | 492 | | |
481 | 493 | | |
| |||
498 | 510 | | |
499 | 511 | | |
500 | 512 | | |
501 | | - | |
| 513 | + | |
502 | 514 | | |
503 | 515 | | |
504 | 516 | | |
| |||
510 | 522 | | |
511 | 523 | | |
512 | 524 | | |
513 | | - | |
| 525 | + | |
514 | 526 | | |
515 | 527 | | |
516 | 528 | | |
| |||
526 | 538 | | |
527 | 539 | | |
528 | 540 | | |
529 | | - | |
| 541 | + | |
530 | 542 | | |
531 | 543 | | |
532 | 544 | | |
| |||
0 commit comments