Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3332345
D13928.id45818.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13928.id45818.diff
View Options
diff --git a/services/commtest/src/backup/backup_utils.rs b/services/commtest/src/backup/backup_utils.rs
--- a/services/commtest/src/backup/backup_utils.rs
+++ b/services/commtest/src/backup/backup_utils.rs
@@ -23,7 +23,7 @@
Some(predefined_byte_value),
)),
attachments: vec![],
- siwe_backup_msg: None,
+ siwe_backup_msg: Some("message".to_string()),
}
}
diff --git a/services/commtest/tests/backup_integration_test.rs b/services/commtest/tests/backup_integration_test.rs
--- a/services/commtest/tests/backup_integration_test.rs
+++ b/services/commtest/tests/backup_integration_test.rs
@@ -87,6 +87,7 @@
serde_json::from_slice(&backup_info_response)?;
assert_eq!(response.backup_id, backup_data.backup_id);
assert_eq!(response.user_id, device_info.user_id);
+ assert_eq!(response.siwe_backup_msg, backup_data.siwe_backup_msg);
let user_keys = backup_client
.download_backup_data(&latest_backup_descriptor, RequestedData::UserKeys)
diff --git a/services/commtest/tests/backup_upload_test.rs b/services/commtest/tests/backup_upload_test.rs
--- a/services/commtest/tests/backup_upload_test.rs
+++ b/services/commtest/tests/backup_upload_test.rs
@@ -50,6 +50,7 @@
assert_eq!(response.backup_id, backup_data.backup_id);
assert_eq!(response.user_id, device_info.user_id);
+ assert_eq!(response.siwe_backup_msg, backup_data.siwe_backup_msg);
let user_keys = backup_client
.download_backup_data(&latest_backup_descriptor, RequestedData::UserKeys)
@@ -236,6 +237,7 @@
assert_eq!(response.backup_id, new_user_keys.backup_id);
assert_eq!(response.user_id, device_info.user_id);
+ assert_eq!(response.siwe_backup_msg, backup_data.siwe_backup_msg);
// Test User Keys download -> should be updated
let backup_descriptor = BackupDescriptor::BackupID {
diff --git a/shared/backup_client/src/lib.rs b/shared/backup_client/src/lib.rs
--- a/shared/backup_client/src/lib.rs
+++ b/shared/backup_client/src/lib.rs
@@ -81,11 +81,10 @@
"user_data_hash",
Sha256::digest(&user_data_value).encode_hex::<String>(),
)
- .part("user_data", Part::stream(Body::from(user_data_value)));
+ .part("user_data", Part::stream(Body::from(user_data_value)))
+ .text("attachments", attachments.join("\n"));
}
- form = form.text("attachments", attachments.join("\n"));
-
if let Some(siwe_backup_msg_value) = siwe_backup_msg {
form = form.text("siwe_backup_msg", siwe_backup_msg_value);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 11:47 PM (15 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2529694
Default Alt Text
D13928.id45818.diff (2 KB)
Attached To
Mode
D13928: [backup-client] avoid adding `attachments` when uploading User Keys
Attached
Detach File
Event Timeline
Log In to Comment