Skip to content

Commit

Permalink
fix(execute_instruction): SQU-681 Prevent execute_instruction for auth 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bguillaumat committed Jan 25, 2023
1 parent 7ef3ed2 commit a2448c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion programs/squads-mpl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,12 @@ pub mod squads_mpl {
let ms_key = &ctx.accounts.multisig.key();
let ms_ix = &mut ctx.accounts.instruction;
let tx = &mut ctx.accounts.transaction;


// To prevent potential failure with the Squad account auth 0 can't be executed in a specific instruction
if tx.authority_index == 0 {
return err!(MsError::InvalidAuthorityIndex);
}

// setup the authority seeds
let authority_seeds = [
b"squad",
Expand Down

0 comments on commit a2448c5

Please # to comment.