forked from phoenix/litellm-mirror
fix - audio_transcriptions security fix
This commit is contained in:
parent
e52e4cc1a9
commit
5d39865362
1 changed files with 3 additions and 0 deletions
|
@ -4166,6 +4166,9 @@ async def audio_transcriptions(
|
|||
file.filename is not None
|
||||
) # make sure filename passed in (needed for type)
|
||||
|
||||
# rename the file to a random hash file name -> we eventuall remove the file and don't want to remove any local files
|
||||
file.filename = f"tmp-request" + str(uuid.uuid4())
|
||||
|
||||
with open(file.filename, "wb+") as f:
|
||||
f.write(await file.read())
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue