Custom Field Validation Not Enforced in Users-Permissions Plugin #22196
Labels
issue: bug
Issue reporting a bug
severity: medium
If it breaks the basic use of the product but can be worked around
source: plugin:users-permissions
Source is plugin/users-permissions package
status: pending reproduction
Waiting for free time to reproduce the issue, or more information
version: 5
Bug report
Required System information
Describe the bug
The issue occurs in the users-permissions plugin/extension.
I have added a custom field to the user model and configured it as both required and unique. However, when I make a POST request to create or register a user:
Steps to reproduce the behavior
• Test with the custom field unset.
• Test with a duplicate value for the custom field.
Expected behavior
Screenshots
Code snippets
POST /auth/local/register
Duplicate Value
{ "username": "testuser", "email": "[email protected]", "password": "password123", "customField": {{duplicate value}} }
Missing Value
{ "username": "testuser", "email": "[email protected]", "password": "password123" }
Additional context
This issue directly affects data integrity as the constraints set on the custom field (required and unique) are not being enforced.
The text was updated successfully, but these errors were encountered: