Skip to content

Commit 3ec6c45

Browse files
authored
Audit Fixes 9 : Misleading success response for non-xion auth operations (#553)
1 parent d92d6f4 commit 3ec6c45

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

framework/contracts/account/src/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ pub enum AccountError {
121121
contract: String,
122122
},
123123

124+
#[error("No auth methods capabilities on this account (xion feature disabled)")]
125+
NoAuthMethods {},
126+
124127
#[error("Abstract Account don't have Authentication")]
125128
AbsAccNoAuth {},
126129

framework/contracts/account/src/execution.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub fn add_auth_method(
131131
}
132132
#[cfg(not(feature = "xion"))]
133133
{
134-
Ok(AccountResponse::action("add_auth"))
134+
Err(AccountError::NoAuthMethods {})
135135
}
136136
}
137137

@@ -143,7 +143,7 @@ pub fn remove_auth_method(_deps: DepsMut, _env: Env, _info: MessageInfo, _id: u8
143143
}
144144
#[cfg(not(feature = "xion"))]
145145
{
146-
Ok(AccountResponse::action("remove_auth"))
146+
Err(AccountError::NoAuthMethods {})
147147
}
148148
}
149149

0 commit comments

Comments
 (0)