Skip to content

initialize does not validate admin is not zero address #196

Description

@ritaifeoluwa

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programgood first issueGood for newcomerssecuritySecurity vulnerability or hardening

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions