mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 15:15:51 +01:00
The asset middleware in the screen example was vulnerable to path traversal attacks. User-provided URL paths were concatenated directly with the base directory without validation, allowing attackers to use `../` sequences to access files outside the intended assets directory. Changes: - Use filepath.Join for safe path construction - Clean paths with filepath.Clean to normalize them - Validate that the resolved path stays within the assets directory - Reject requests that would escape the assets directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| assets | ||
| main.go | ||
| README.md | ||
| screens.go | ||
Screen Example
This example will detect all attached screens and display their details.
Running the example
To run the example, simply run the following command:
go run .
Status
| Platform | Status |
|---|---|
| Mac | Working |
| Windows | Working |
| Linux |