mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-15 12:50:42 -07:00
Two small safety improvements: 1. Voice prompt cache (cache.py): add weights_only=True to torch.load() so cached .prompt files are loaded using the safe unpickler instead of the unrestricted pickle deserializer. This follows the PyTorch 2.6+ best practice of opting in to safe loading for all torch.load() calls. 2. SPA catch-all (app.py): replace str.startswith() path guard with Path.is_relative_to(). The string prefix check passes for sibling paths like /app/frontend_evil/ that share the /app/frontend prefix. is_relative_to() correctly tests directory containment.