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>
Thanks for wanting to help out with testing/developing Wails v3! This guide will help you get started.
Getting Started
All the instructions for getting started are in the v3 documentation directory: mkdocs-website.
Please read the README.md file in that directory for more information.