Commit Graph
7 Commits
Author SHA1 Message Date
Sander 15aed8c3bb Implement model path normalization and enhance security checks in API endpoints
Added a new helper function to normalize user-provided model paths, ensuring consistent handling of path separators and rejecting invalid paths. Updated the `remove_model` and `download_model` functions to utilize this normalization, improving security by validating paths against allowed directories and preventing directory traversal attacks. This enhances the robustness of file handling in the API.
2026-01-08 21:23:15 +01:00
Sander ea0b68bc8b Refactor download_model function to remove directory validation
Removed the directory validation logic from the download_model function in api_server.py, simplifying the file download process. Updated version to 1.1.3 in pyproject.toml to reflect changes.
2026-01-06 10:14:13 +01:00
Sander 2196871d14 Add download endpoint for model files
Implemented a new API endpoint to allow downloading model files from the server. The endpoint includes validation for folder and model inputs, checks for file existence, and ensures that the requested file is within allowed directories. Updated the README to document the new endpoint and bumped the version to 1.1.2 in pyproject.toml.
2026-01-06 10:09:15 +01:00
brantje 267ff57680 Update filename key in model folder response
Changed the key from "name" to "filename" in the response structure of the get_model_folder function to better reflect the content being returned. This improves clarity in the API response.
2025-05-28 11:36:20 +00:00
brantje 00558f031d "Fixed the success_resp overshare. Less is more."
Apparently, success_resp didn’t need a message—it was doing just fine without it. Cleaned it up so it stops oversharing like that one friend at brunch. You're welcome, future me.
2025-04-12 09:48:43 +00:00
brantje eef0bcac74 "Added model installer: URL checks & bad domain burns 🔥"
Because everyone loves a good install tool, I slapped together a route to magically fetch models from an *allowed* URL list. Turns out the internet is still scary, so I threw in domain checks to keep things wholesome. It's not perfect, but hey, neither am I.
2025-04-12 08:37:26 +00:00
brantje a2454c39e7 "Added API, metrics & logging while juggling chainsaws"
Love API? Me too. Added a robust API for model and image handling, sprinkled in Prometheus metrics for fun graphs, and tossed in colorful logging because why not? Pretty sure I even taught it to make coffee (spoiler: it doesn’t). All aboard the functionality express! 🚂
2025-04-09 20:09:52 +00:00