[PR #1123] [MERGED] Fix background upload for unsupported formats #1251

Closed
opened 2025-11-01 21:14:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/1123
Author: @kolaente
Created: 7/15/2025
Status: Merged
Merged: 7/15/2025
Merged by: @kolaente

Base: mainHead: codex/fix-issue-#1121-in-vikunja


📝 Commits (1)

  • cf76382 fix(background): reuse mime whitelist

📊 Changes

2 files changed (+69 additions, -0 deletions)

View changed files

📝 pkg/modules/background/handler/background.go (+27 -0)
pkg/modules/background/handler/errors.go (+42 -0)

📄 Description

Resolves https://github.com/go-vikunja/vikunja/issues/1121

Summary

  • validate background upload mime types in handler
  • detect unsupported formats in SaveBackgroundFile
  • add ErrFileUnsupportedImageFormat in background handler
  • reuse allowed mime list

Testing

  • mage lint:fix

https://chatgpt.com/codex/tasks/task_e_68760fb7797483229431bd2d0447f058


🔄 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/go-vikunja/vikunja/pull/1123 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 7/15/2025 **Status:** ✅ Merged **Merged:** 7/15/2025 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `codex/fix-issue-#1121-in-vikunja` --- ### 📝 Commits (1) - [`cf76382`](https://github.com/go-vikunja/vikunja/commit/cf76382d9f334dfc33df5e4c58541116c8d340ea) fix(background): reuse mime whitelist ### 📊 Changes **2 files changed** (+69 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `pkg/modules/background/handler/background.go` (+27 -0) ➕ `pkg/modules/background/handler/errors.go` (+42 -0) </details> ### 📄 Description Resolves https://github.com/go-vikunja/vikunja/issues/1121 ## Summary - validate background upload mime types in handler - detect unsupported formats in SaveBackgroundFile - add ErrFileUnsupportedImageFormat in background handler - reuse allowed mime list ## Testing - `mage lint:fix` ------ https://chatgpt.com/codex/tasks/task_e_68760fb7797483229431bd2d0447f058 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-01 21:14:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#1251