Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Fixes 9 : Misleading success response for non-xion auth operations #553

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions framework/contracts/account/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ pub enum AccountError {
contract: String,
},

#[error("No auth methods capabilities on this account (xion feature disabled)")]
NoAuthMethods {},

#[error("Abstract Account don't have Authentication")]
AbsAccNoAuth {},

Expand Down
4 changes: 2 additions & 2 deletions framework/contracts/account/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
}
#[cfg(not(feature = "xion"))]
{
Ok(AccountResponse::action("add_auth"))
Err(AccountError::NoAuthMethods {})

Check warning on line 130 in framework/contracts/account/src/execution.rs

View check run for this annotation

Codecov / codecov/patch

framework/contracts/account/src/execution.rs#L130

Added line #L130 was not covered by tests
}
}

Expand All @@ -138,7 +138,7 @@
}
#[cfg(not(feature = "xion"))]
{
Ok(AccountResponse::action("remove_auth"))
Err(AccountError::NoAuthMethods {})

Check warning on line 141 in framework/contracts/account/src/execution.rs

View check run for this annotation

Codecov / codecov/patch

framework/contracts/account/src/execution.rs#L141

Added line #L141 was not covered by tests
}
}

Expand Down
Loading