Skip to content

feat(users): enforce profile field and metadata safety limits - #130

Merged
mckaragoz merged 3 commits into
CodeBeamOrg:devfrom
mckaragoz:UserInputStringLength
Oct 31, 2026
Merged

mckaragoz merged 3 commits into
CodeBeamOrg:devfrom
mckaragoz:UserInputStringLength

Conversation

@mckaragoz

Copy link
Copy Markdown
Contributor

Summary

Closes #122.

Introduces framework-level safety limits for user profile fields and metadata to prevent excessive storage usage and resource consumption.

Changes

  • Add centralized UserProfileLimits constants.
  • Enforce mandatory validation during user creation, profile creation, cloning, and updates.
  • Limit metadata entry count, key/value lengths, and total UTF-8 size.
  • Align EF Core column lengths and shared ProfileDialog inputs with the defined limits.
  • Preserve IUserProfileValidator extensibility without allowing framework safety limits to be bypassed.
  • Add boundary and regression tests covering validation and persistence safety.
  • Document profile limits, validation behavior, and error codes.

Notes

  • Existing databases may require migrations and validation of previously stored profile data.
  • No changes to authentication or session behavior.

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.93%. Comparing base (40278e6) to head (8f9bae6).

Files with missing lines Patch % Lines
...r/Infrastructure/Validator/UserProfileValidator.cs 75.00% 0 Missing and 1 partial ⚠️
...Users.Reference/Services/UserApplicationService.cs 96.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #130      +/-   ##
==========================================
+ Coverage   86.73%   86.93%   +0.19%     
==========================================
  Files         681      682       +1     
  Lines       18946    19020      +74     
  Branches     2305     2316      +11     
==========================================
+ Hits        16433    16535     +102     
+ Misses       1765     1735      -30     
- Partials      748      750       +2     
Flag Coverage Δ
framework 86.93% <97.33%> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mckaragoz
mckaragoz merged commit 45dcfcd into CodeBeamOrg:dev Oct 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add profile field length limits and validation

1 participant