fix - audio_transcriptions security fix
This commit is contained in:
parent
e52e4cc1a9
commit
5d39865362
@ -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…
Reference in New Issue
Block a user