Skip to content

Harden REST email arguments with schema validation #128

Description

@chubes4

Several public REST routes declare email arguments as strings but replace the default schema validator with the raw is_email callback. Non-string request values can therefore reach a scalar-only callback instead of returning a normal rest_invalid_param response. Use the REST schema's native type: string and format: email validation on registration, contact submission, and image voting, with regression coverage for non-string values.\n\nDiscovered by the disposable WordPress 7.0.2 adversarial authentication campaign.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions