mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #4674] [MERGED] sec: Sanitize 11labs voice id to address semgrep security issue: tainted-path-traversal-stdlib-fastapi #8328
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/4674
Author: @crizCraig
Created: 8/16/2024
Status: ✅ Merged
Merged: 8/17/2024
Merged by: @tjbck
Base:
dev← Head:sanitize-11labs-voiceid📝 Commits (5)
02577f6Cache elevenlabs voice call (can take 1s)59d2c67Optimize imports4560f3bReturn a dict from get_available_voices442f503Sanitize voice_id5f36807Note tts defaults are from openai📊 Changes
2 files changed (+72 additions, -51 deletions)
View changed files
📝
backend/apps/audio/main.py(+70 -49)📝
backend/config.py(+2 -2)📄 Description
Changelog Entry
Description
/speechwithout sanitization. They should be open AI names or elevenlabs id's, so the PR callsget_elevenlabs_voices()to ensure the passed ID is one of those. Else an HTTP 400 is returned.Added
get_elevenlabs_voices()with@lru_cacheto avoid waiting 1 second for every/speechcall on just that.Changed
Security
Testing
How to test
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.