mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
[PR #923] [MERGED] fix: ensure users imported from LDAP have fields validated #544
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/923
Author: @ItalyPaleAle
Created: 9/7/2025
Status: ✅ Merged
Merged: 9/9/2025
Merged by: @stonith404
Base:
main← Head:validate-ldap-user📝 Commits (6)
8039546fix: ensure users imported from LDAP have fields validated2461487Remove redundant check6ef0ce1Merge branch 'main' of https://github.com/pocket-id/pocket-id into validate-ldap-userc3f6845Validate user group toobc06f56Added tests for ValidateUsername and ValidateClientID7555df1Merge branch 'main' into validate-ldap-user📊 Changes
6 files changed (+209 additions, -10 deletions)
View changed files
📝
backend/internal/dto/user_dto.go(+14 -0)➕
backend/internal/dto/user_dto_test.go(+89 -0)📝
backend/internal/dto/user_group_dto.go(+14 -0)📝
backend/internal/dto/validations.go(+19 -9)➕
backend/internal/dto/validations_test.go(+58 -0)📝
backend/internal/service/ldap_service.go(+15 -1)📄 Description
Fixes a side issue discovered in #909, where users imported from LDAP did not go through validation rules.
Note: after upgrading, if the database contains LDAP-imported users that fail the validation, those will not be updated anymore and users should see warnings in the logs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.