Skip to content

Commit cef7bca

Browse files
committed
fix: enforce 20-byte app_id length in system_setup
1 parent 4aeaf1e commit cef7bca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dstack-util/src/system_setup.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,12 @@ impl<'a> Stage0<'a> {
12881288
if instance_info.app_id.is_empty() {
12891289
instance_info.app_id = truncated_compose_hash.to_vec();
12901290
}
1291+
if instance_info.app_id.len() != 20 {
1292+
bail!(
1293+
"Invalid app id length: expected 20 bytes, got {}",
1294+
instance_info.app_id.len()
1295+
);
1296+
}
12911297

12921298
let disk_reusable = !key_provider.is_none();
12931299
if (!disk_reusable) || instance_info.instance_id_seed.is_empty() {

0 commit comments

Comments
 (0)