Skip to content

Commit c810cd8

Browse files
authored
fix: Empty actions array should be allowed for v1 claim compatibility [CAI-9573] (#1477)
* fix: allow empty actions array for v1 claims [1413]
1 parent f141a6b commit c810cd8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sdk/src/claim.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,13 @@ impl Claim {
20012001
)?;
20022002
}
20032003

2004+
// Skip further checks for v1 claims if not in strict validation mode
2005+
if claim.version() == 1 {
2006+
if let Ok(false) = get_settings_value::<bool>("verify.strict_v1_validation") {
2007+
return Ok(()); // no further checks for v1 claims
2008+
}
2009+
}
2010+
20042011
// 1. make sure every action has an actions array that is not empty
20052012
if let Some(bad_assertion) = all_actions.iter().find(|a| {
20062013
if let Ok(actions) = Actions::from_assertion(a.assertion()) {

0 commit comments

Comments
 (0)