Bound chat image decoding and verify channel image presentation
This commit is contained in:
1 parent
b4e084dd25
commit
de99c5fdea
7 files changed
+309
-8
No files matched your search
@@ -301,6 +301,11 @@ fn file_browser_rejects_invalid_list_before_connection() {
|
||||
}
|
||||
let (reply, _) = core.request("valid-list", "file_list", json!({"channel_id":9_007_199_254_740_991u64,"path":"/"}));
|
||||
assert_eq!(reply["error"]["code"], "not_connected", "{reply}");
|
||||
for args in [json!({"channel_id":0,"path":"/image.png"}), json!({"channel_id":1,"path":"/images/"}),
|
||||
json!({"channel_id":1,"path":"/image.png","destination":"unapproved"})] {
|
||||
let (reply, _) = core.request("invalid-image", "file_fetch_image", args);
|
||||
assert_eq!(reply["error"]["code"], "bad_request", "{reply}");
|
||||
}
|
||||
let (reply, _) = core.request("invalid-history", "file_transfers", json!({"channel_id":1}));
|
||||
assert_eq!(reply["error"]["code"], "bad_request", "{reply}");
|
||||
let (reply, _) = core.request("offline-history", "file_transfers", json!({}));
|
||||
|
||||
Reference in new issue
Block a user