max / goingson
1 file changed,
+5 insertions,
-3 deletions
| @@ -66,7 +66,7 @@ pub async fn upload_pending_blobs( | |||
| 66 | 66 | } | |
| 67 | 67 | }; | |
| 68 | 68 | ||
| 69 | - | if let Err(e) = client.blob_upload(&upload_resp.upload_url, data).await { | |
| 69 | + | if let Err(e) = client.blob_upload(hash, &upload_resp.upload_url, data).await { | |
| 70 | 70 | warn!("Failed to upload blob {}: {}", short(hash), e); | |
| 71 | 71 | continue; | |
| 72 | 72 | } | |
| @@ -126,8 +126,10 @@ pub async fn download_missing_blobs( | |||
| 126 | 126 | } | |
| 127 | 127 | }; | |
| 128 | 128 | ||
| 129 | - | // Download and decrypt | |
| 130 | - | let data = match client.blob_download(&download_url).await { | |
| 129 | + | // Download and decrypt. The SDK now AAD-binds and re-verifies the content | |
| 130 | + | // hash itself; the local check below stays as belt-and-braces before the | |
| 131 | + | // file is committed under its hash name. | |
| 132 | + | let data = match client.blob_download(hash, &download_url).await { | |
| 131 | 133 | Ok(d) => d, | |
| 132 | 134 | Err(e) => { | |
| 133 | 135 | warn!("Failed to download blob {}: {}", short(hash), e); |