Reject invalid icon uploads and serve canonical PNG output

Open
#223 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, typescript

Research direction

Start by locating the dashboard and Minecraft server icon upload and serving paths, then trace how uploaded bytes are decoded and icons are replaced. Add bounded regression coverage for invalid and valid images, including preservation of the prior icon on failure and both required outputs on success. Confirm successful responses use image/png and nosniff; update the wiki if accepted formats, errors, or limits change.

Written by the indexing model from the issue text.

Description

enhancement

What to build

Accept instance icons only after successful decoding and canonical PNG conversion. Invalid uploads should produce a clear error and preserve the prior icon.

Context

Related to #65 and closed #47, which concern icon UX/upload access rather than invalid-image handling. No active-content browser execution was demonstrated.

This follows the November 17 source audit. Treat it as a hardening/validation task, not a confirmed exploit report. Detailed audit evidence and validation limitations remain in the local audit report; report any confirmed vulnerability privately under SECURITY.md.

Acceptance criteria

  • Decode and validate before replacing either dashboard or Minecraft server icons; remove the raw-byte fallback.
  • Serve successful canonical output with explicit image/png and X-Content-Type-Options: nosniff behavior.
  • Invalid or unsupported uploads leave the previous icon unchanged; valid uploads still produce both required icons.
  • Add bounded invalid/valid-image regression coverage.
  • Update the wiki if accepted formats, errors or limits change.

Blocked by

None (can start independently). Coordinate with related issues without expanding their scope.

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
13h 12m
Merged PRs (30d)
57

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Isopod-Project/Isopod

All issues in Isopod-Project/Isopod

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.