[GH-ISSUE #1121] background upload: image: unknown format #6327

Closed
opened 2026-04-20 16:54:35 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @sentry[bot] on GitHub (Jul 15, 2025).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/1121

Sentry Issue: API-CLOUD-14

*errors.errorString: image: unknown format
*echo.HTTPError: code=500, message=Internal Server Error, internal=image: unknown format
  File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 153, in 1
  File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 151, in setupSentry.func1
...
(2 additional frame(s) were not displayed)

From the request body, it appears this was caused by trying to upload an svg, which is not supported. To fix this, the upload format should be validated and a proper error message shown.

Request body (truncated):

"background"; filename="image.svg"

Content-Type: application/octet-stream



<svg width="148" height="90" fill="none" xmlns="http://www.w3.org/2000/svg"><path/>...truncated...</svg>

------geckoformboundary63198891ce7ef24cd773f7c753c6e4be--

Request uri: https://vikunja.example.tld/api/v1/projects/xxxxx/backgrounds/upload

Originally created by @sentry[bot] on GitHub (Jul 15, 2025). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/1121 Sentry Issue: [API-CLOUD-14](https://vikunja.sentry.io/issues/6747568875/?referrer=github_integration) ``` *errors.errorString: image: unknown format *echo.HTTPError: code=500, message=Internal Server Error, internal=image: unknown format File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 153, in 1 File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 151, in setupSentry.func1 ... (2 additional frame(s) were not displayed) ``` From the request body, it appears this was caused by trying to upload an svg, which is not supported. To fix this, the upload format should be validated and a proper error message shown. Request body (truncated): ``` "background"; filename="image.svg" Content-Type: application/octet-stream <svg width="148" height="90" fill="none" xmlns="http://www.w3.org/2000/svg"><path/>...truncated...</svg> ------geckoformboundary63198891ce7ef24cd773f7c753c6e4be-- ``` Request uri: `https://vikunja.example.tld/api/v1/projects/xxxxx/backgrounds/upload`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#6327