diff --git a/programs/squads-mpl/src/lib.rs b/programs/squads-mpl/src/lib.rs index f75e699..8152f87 100644 --- a/programs/squads-mpl/src/lib.rs +++ b/programs/squads-mpl/src/lib.rs @@ -353,7 +353,10 @@ pub mod squads_mpl { match ctx.accounts.transaction.authority_index { // if its a 0 authority, use the MS pda seeds 0 => { - invoke_signed( + if &ix.program_id != ctx.program_id { + return err!(MsError::InvalidAuthorityIndex); + } + invoke_signed( &ix, &ix_account_infos, &[&ms_authority_seeds] @@ -430,6 +433,10 @@ pub mod squads_mpl { ix_account_infos.push(ix_account_info.clone()); } + if tx.authority_index < 1 && &ix.program_id != ctx.program_id { + return err!(MsError::InvalidAuthorityIndex); + } + invoke_signed( &ix, &ix_account_infos,