LizardByte / LizardByte/Sunshine

Web UI: File browser does not validate PNG images for Application Covers

Open
#5,523 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
41.3k
Forks
2.1k
Avg merge
23h 47m
Merged PRs (30d)
124

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your issue described in the documentation?

- [x] I have read the documentation

### Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

### Describe the Bug

The "Select File" file browser modal in the Web UI does not validate if the selected file is a PNG image when choosing an Application's Cover Image.

https://github.com/user-attachments/assets/816a6368-b331-41dd-b6f8-61dcc86688c2

**Reproduction Steps:**
1. Open the Sunshine Web UI and navigate to the **Applications** tab.
2. Click **Add New** or edit an existing application.
3. Scroll down to the **Image** input field and click the folder icon ("Select File").
4. In the file browser, select a non-PNG file (e.g., a `.md` file) and click **Select**.
5. The file browser accepts the file and updates the path, providing no feedback to the user that the file is invalid.

### Expected Behavior

The file browser modal should either filter out non-PNG files or display an error message if the user selects an unsupported file type.

### Additional Context

Because the Web UI lacks validation, users can mistakenly configure their apps with unsupported images. They won't realize it failed until they notice their game cover is missing on Moonlight, leading to a confusing user experience.

### Host Operating System

macOS

### Operating System Version

26.5.2

### Architecture

arm64/aarch64

### Package

macOS - Homebrew

### GPU Type

Apple Silicon

### GPU Model

n/a

### GPU Driver/Mesa Version

n/a

### Capture Method

AVCaptureScreen (macOS)

### Apps

```json
{
"apps": [
{
"image-path": "desktop.png",
"name": "Desktop"
},
{
"detached": [
"open steam://open/bigpicture"
],
"image-path": "steam.png",
"name": "Steam Big Picture",
"prep-cmd": [
{
"do": "",
"undo": "open steam://close/bigpicture"
}
]
}
],
"env": {
"PATH": "$(PATH):$(HOME)/.local/bin"
}
}
```

### Log output

```shell

```

### Online logs

_No response_

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the Web UI's file browser modal and the Application Image input, then reproduce the issue by selecting a non-PNG file such as a .md file. Done means unsupported files are filtered out or an error is shown when one is selected, while valid PNG selection continues to work.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.