Skip to content

paginate does not cap limit — a caller can force an enormous response #334

Description

@Jaydbrown

contracts/factory/src/query.rs paginate and DripFactory::streams_by_sender / streams_by_recipient explicitly do not bound limit ("callers should use a reasonable value"). A caller passing limit = u32::MAX makes the contract build a Vec<u64> up to the length of the sender's entire history in a single view call. Clamp limit to a hard maximum (e.g. 100) inside paginate.


Filed from a codebase review pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions