Description
The Factory contract does not validate that the admin address is not the zero address. A zero-address admin would make the factory permanently locked.
Current behavior
pub fn initialize(
env: Env,
admin: Address,
pool_wasm_hash: BytesN<32>,
) -> Result<(), FactoryError> {
// No check on admin
}
Expected behavior
Add validation:
assert!(admin != Address::zero(&env), "Admin cannot be zero address");
Why this matters
Setting admin to zero would make all admin functions permanently unusable.
Labels
security, good first issue
Description
The Factory contract does not validate that the admin address is not the zero address. A zero-address admin would make the factory permanently locked.
Current behavior
Expected behavior
Add validation:
Why this matters
Setting admin to zero would make all admin functions permanently unusable.
Labels
security, good first issue