[PR #413] [MERGED] fix: ensure file descriptors are closed + other bugs #825

Closed
opened 2025-10-08 00:17:53 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/413
Author: @ItalyPaleAle
Created: 4/3/2025
Status: Merged
Merged: 4/4/2025
Merged by: @stonith404

Base: mainHead: 406-fixup


📝 Commits (1)

  • 34842e3 fix: ensure file descriptors are closed + other bugs

📊 Changes

6 files changed (+52 additions, -15 deletions)

View changed files

📝 backend/internal/controller/user_controller.go (+3 -0)
📝 backend/internal/job/file_cleanup_job.go (+3 -3)
📝 backend/internal/model/user.go (+4 -8)
📝 backend/internal/service/user_service.go (+4 -4)
📝 backend/internal/utils/string_util.go (+13 -0)
📝 backend/internal/utils/string_util_test.go (+25 -0)

📄 Description

  1. Ensures file descriptors are closed: changes in #406 meant that when reading the default picture, file descriptors would be left open
  2. fixes ownership issue of the defaultPicture stream (previous code was potentially unsafe as the returned slice was valid only until the next buffer modification)
  3. Fixes generation of initials when there are non-ASCII characters.

Fixup from #406


🔄 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/413 **Author:** [@ItalyPaleAle](https://github.com/ItalyPaleAle) **Created:** 4/3/2025 **Status:** ✅ Merged **Merged:** 4/4/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `main` ← **Head:** `406-fixup` --- ### 📝 Commits (1) - [`34842e3`](https://github.com/pocket-id/pocket-id/commit/34842e3891ff479b27ec5ab782f579c6c6eaf3a8) fix: ensure file descriptors are closed + other bugs ### 📊 Changes **6 files changed** (+52 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/controller/user_controller.go` (+3 -0) 📝 `backend/internal/job/file_cleanup_job.go` (+3 -3) 📝 `backend/internal/model/user.go` (+4 -8) 📝 `backend/internal/service/user_service.go` (+4 -4) 📝 `backend/internal/utils/string_util.go` (+13 -0) 📝 `backend/internal/utils/string_util_test.go` (+25 -0) </details> ### 📄 Description 1. Ensures file descriptors are closed: changes in #406 meant that when reading the default picture, file descriptors would be left open 2. fixes ownership issue of the `defaultPicture` stream (previous code was potentially unsafe as the returned slice was valid only until the next buffer modification) 3. Fixes generation of initials when there are non-ASCII characters. Fixup from #406 --- <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-08 00:17:53 +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-pocket-id-1#825