[Bugfix][Multimodal] Validate base64 video payloads, matching image and audio (#54323)
Signed-off-by: hotragn <hotragn.pettugani_2024@woxsen.edu.in> Signed-off-by: Isotr0py <2037008807@qq.com> Co-authored-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
co-authored by
Isotr0py
parent
39545e475d
commit
a2685f2cda
@@ -190,7 +190,7 @@ class VideoMediaIO(MediaIO[MediaWithBytes[tuple[DecodedFrames, dict[str, Any]]]]
|
||||
}
|
||||
return MediaWithBytes((frames, metadata), data.encode())
|
||||
|
||||
return self.load_bytes(pybase64.b64decode(data))
|
||||
return self.load_bytes(pybase64.b64decode(data, validate=True))
|
||||
|
||||
def load_file(
|
||||
self, filepath: Path
|
||||
|
||||
Reference in New Issue
Block a user