You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should either document or change this behavior. One should never enable the CPI feature when building and deploying the program. It should only be used when using a program as a CPI dependency.
The text was updated successfully, but these errors were encountered:
A better solution is to add a new attribute #[account(program_signer)], or #[account(signer = program)] that has the behavior described above. The #[account(signer)] attribute should always check the signature, even if the cpi feature is enabled.
When the "cpi" feature is enabled we don't check the signer field. See https://github.com/project-serum/anchor/blob/master/lang/syn/src/codegen/accounts.rs#L347.
We should either document or change this behavior. One should never enable the CPI feature when building and deploying the program. It should only be used when using a program as a CPI dependency.
The text was updated successfully, but these errors were encountered: