Skip to content

[Feature]: Add profile field length limits and validation #122

Description

@mckaragoz

Description

UltimateAuth currently does not enforce maximum lengths for standard user profile fields. Unrestricted input may lead to excessive storage usage, unnecessary resource consumption, and potential DoS scenarios.

Introduce consistent, security-oriented limits across the Users domain.

Requirements

  • Enforce limits on both profile creation and update operations.
  • Keep validation consistent across InMemory and EF Core implementations.
  • Align EF Core column lengths with the defined limits.
  • Add reasonable limits for profile metadata (entry count, key/value lengths, and total size).
  • Return clear validation errors when limits are exceeded.
  • Add boundary and regression tests.
  • Update shared ProfileDialog fields to use the same limits for MaxLength and character counters.

Notes

  • These are application-level safety limits, not a replacement for HTTP request size limits or rate limiting.
  • Preserve the existing IUserProfileValidator extensibility for application-specific validation.
  • Review existing persisted data before introducing database constraints.
  • The limits represent framework-level maximums. Applications may enforce stricter rules through custom validation, but must not bypass these safety limits.

Activity

  1. added this to the v0.2.0 milestone on Oct 29, 2026
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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions