src/api2/backup/environment.rs - add_blob: always verify blob crc
This commit is contained in:
parent
eecb23560b
commit
34066e2eeb
@ -400,9 +400,9 @@ impl BackupEnvironment {
|
||||
let blob_len = data.len();
|
||||
let orig_len = data.len(); // fixme:
|
||||
|
||||
let mut blob = DataBlob::from_raw(data)?;
|
||||
// always comput CRC at server side
|
||||
blob.set_crc(blob.compute_crc());
|
||||
let blob = DataBlob::from_raw(data)?;
|
||||
// always verify CRC at server side
|
||||
blob.verify_crc()?;
|
||||
|
||||
let raw_data = blob.raw_data();
|
||||
file_set_contents(&path, raw_data, None)?;
|
||||
|
Loading…
Reference in New Issue
Block a user