[PR #923] [MERGED] fix: ensure users imported from LDAP have fields validated #544

Closed
opened 2025-10-07 00:18:15 +03:00 by OVERLORD · 0 comments
Owner

📋 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: mainHead: validate-ldap-user


📝 Commits (6)

📊 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.

## 📋 Pull Request Information **Original PR:** https://github.com/pocket-id/pocket-id/pull/923 **Author:** [@ItalyPaleAle](https://github.com/ItalyPaleAle) **Created:** 9/7/2025 **Status:** ✅ Merged **Merged:** 9/9/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `main` ← **Head:** `validate-ldap-user` --- ### 📝 Commits (6) - [`8039546`](https://github.com/pocket-id/pocket-id/commit/80395465817776021b90c638480cbf9e612e4f4c) fix: ensure users imported from LDAP have fields validated - [`2461487`](https://github.com/pocket-id/pocket-id/commit/246148722efefd989fcc7c388d30cdb833be678b) Remove redundant check - [`6ef0ce1`](https://github.com/pocket-id/pocket-id/commit/6ef0ce1c50016a1981ecbb86d729177a56e0b69a) Merge branch 'main' of https://github.com/pocket-id/pocket-id into validate-ldap-user - [`c3f6845`](https://github.com/pocket-id/pocket-id/commit/c3f6845901841996ba5eb6b7e679eeaebbf7d124) Validate user group too - [`bc06f56`](https://github.com/pocket-id/pocket-id/commit/bc06f5675e94fe6965094c1b5a8013e4b6d3d8bf) Added tests for ValidateUsername and ValidateClientID - [`7555df1`](https://github.com/pocket-id/pocket-id/commit/7555df10fdfb7083dafa27e13b52e76ea804ac40) Merge branch 'main' into validate-ldap-user ### 📊 Changes **6 files changed** (+209 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-07 00:18:15 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#544