b2 upload-file --sha1 <hash> gives no error when receives wrong hash.
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with the b2 upload-file command and its --sha1 option, and compare the behaviour in the issue with the help text quoted there. The open question is whether the tool should compare the supplied hash with the one the server computes, or only document that it skips computing it. Done means a decision on that question, and then either a clear error on mismatch or a clarified help string. Confirm the decision with the maintainers first, since the thread has been silent for about seven years.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm trying to automate some single-file backup tasks, and I've found that while the web API apparently works, I don't know how much I can trust the b2 CLI.
When I call the function with the correct SHA1 as argument:
b2 upload-file --sha1 f871a33490af899cf5476c002c513d1bc4e537b9 futuroapiteste test_file.txt test_file_b2_cli.txt
test_file.txt: 100%|██████████████████████████████████████████████████████████| 5.52k/5.52k [00:01<00:00, 5.42kB/s]
URL by file name: https://f002.backblazeb2.com/file/futuroapiteste/test_file_b2_cli.txt
URL by fileId: https://f002.backblazeb2.com/b2api/v1/b2_download_file_by_id?fileId=4_zeee396220d1bff11694a0a1d_f107a92e113ff0c11_d20180731_m193133_c002_v0001095_t0024
{
"action": "upload",
"fileId": "4_zeee396220d1bff11694a0a1d_f107a92e113ff0c11_d20180731_m193133_c002_v0001095_t0024",
"fileName": "arquivo_teste_b2_cli.txt",
"size": 5520,
"uploadTimestamp": 1533065493000
}
======================================================
When I call the function with the wrong SHA1 as argument:
b2 upload-file --sha1 1111111111111111111111111111111111111111 futuroapiteste test_file.txt test_file_b2_cli_wrong_sha1.txt
test_file.txt: 100%|██████████████████████████████████████████████████████████| 5.52k/5.52k [00:00<00:00, 6.10kB/s]
URL by file name: https://f002.backblazeb2.com/file/futuroapiteste/test_file_b2_cli_wrong_sha1.txt
URL by fileId: https://f002.backblazeb2.com/b2api/v1/b2_download_file_by_id?fileId=4_zeee396220d1bff11694a0a1d_f116da3bb244871bc_d20180731_m193245_c002_v0001094_t0044
{
"action": "upload",
"fileId": "4_zeee396220d1bff11694a0a1d_f116da3bb244871bc_d20180731_m193245_c002_v0001094_t0044",
"fileName": "arquivo_teste_b2_cli_wrong_sha1.txt",
"size": 5520,
"uploadTimestamp": 1533065565000
}
=======================================================
Using:
b2 command line tool, version 1.3.0
When I use b2 list-file-names, it shows me that b2 has the correct SHA1 for both files, which shows that the upload happened well, but then -
Did it check the hash I submitted?
If yes, why there was no error?
(Maybe it recalculated the hash anyway before submitting...?)
(Does b2 upload-file already compare the locally created hash with the hash b2 calculates and returns when the file gets there...? )
The built-in CLI help states:
"By default, upload_file will compute the sha1 checksum of the file
to be uploaded. But, if you already have it, you can provide it
on the command line to save a little time."
Which seems to suggest it does, but it doesn't explicitly say it compares, just 'computes', and the behavior would suggest otherwise.
- Ngôn ngữ chính
- Python
- Star
- 638
- Fork
- 138
- Merge trung bình
- 8 giờ 27 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Backblaze/B2_Command_Line_Tool
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Backblaze/B2_Command_Line_Tool#553 · 2 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Adopt the AI-native SDLC playbook and repository policiesCó thể đã có người làm @goanpeca đã nhận 18 ngày trước. Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Backblaze/B2_Command_Line_Tool#1192 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Backblaze/B2_Command_Line_Tool#1168 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add to MacPortsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
Backblaze/B2_Command_Line_Tool#1161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
b2 ls timestamps human readableĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 56/100
Backblaze/B2_Command_Line_Tool#1155 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Backblaze/B2_Command_Line_Tool
Issue tương tự
-
ライブラリを追加Đang mởpriority middle
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
KATO-Hiro/AtCoderClans#13015 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
StringLiteral to IntegerType/LongType silently truncates fractional strings, changing predicate meaningCó thể đã có người làm @Shahzeb-DataEngineer đã nhận hôm nay. Đang mởkind:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/iceberg-python#4382 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
request-theme
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 62/100
LizardByte/ThemerrDB#10024 · 2 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
btclib-org/btclib-node#2505 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
open-webui/open-webui#34462 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày