-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
Improve downloader service #150046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve downloader service #150046
Conversation
|
Hey there @erwindouna, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the downloader service by adding better validation and handling for subdirectory paths and download directories. The changes enhance error handling and ensure consistent path management.
Key changes:
- Add validation for subdirectory paths in the download service to prevent security issues
- Update config entry data when relative download directory paths are converted to absolute paths
- Add comprehensive test coverage for the new validation logic
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/downloader/__init__.py |
Updates config entry data when converting relative download paths to absolute |
homeassistant/components/downloader/services.py |
Adds subdirectory path validation with proper error handling and translations |
homeassistant/components/downloader/strings.json |
Adds translation strings for new validation error messages |
tests/components/downloader/conftest.py |
Creates comprehensive test fixtures for downloader integration testing |
tests/components/downloader/test_init.py |
Adds tests for config entry setup with relative paths and error conditions |
tests/components/downloader/test_services.py |
Adds parametrized tests for subdirectory validation edge cases |
Co-authored-by: epenet <[email protected]>
Co-authored-by: epenet <[email protected]>
Breaking change
Proposed change
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: