Repository navigation
Commit 39143cb
committed
fix(cactus): apply spec.size pre-check on browser Cache Storage hit path
The browser network path already byte-length-checks `spec.size` before
calling `verifySha256`. The Cache Storage hit path skipped it. Adding
the pre-check inside the existing try-block lets the existing catch
branch (which deletes the cache entry and falls through to refetch)
handle size and hash mismatches uniformly.1 parent 97e4710 commit 39143cb
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
138 | 150 | | |
139 | 151 | | |
140 | 152 | | |
| |||
0 commit comments