[FL-3543] Check the filetype of the update manifest (#3025)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Astra 2023-09-01 10:47:02 +09:00 committed by GitHub
parent 809418b9da
commit 7aa55ebc6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,10 +54,10 @@ static bool
FuriString* filetype;
// TODO FL-3543: compare filetype?
filetype = furi_string_alloc();
update_manifest->valid =
flipper_format_read_header(flipper_file, filetype, &update_manifest->manifest_version) &&
furi_string_cmp_str(filetype, "Flipper firmware upgrade configuration") == 0 &&
flipper_format_read_string(flipper_file, MANIFEST_KEY_INFO, update_manifest->version) &&
flipper_format_read_uint32(
flipper_file, MANIFEST_KEY_TARGET, &update_manifest->target, 1) &&