From d64c63759add40613197028b01b1134dbdf09265 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Sun, 13 Sep 2026 19:05:56 +0200 Subject: [PATCH] more guards to prevent attacks --- facefusion/apis/asset_helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/facefusion/apis/asset_helper.py b/facefusion/apis/asset_helper.py index 7cf68359..521ea89a 100644 --- a/facefusion/apis/asset_helper.py +++ b/facefusion/apis/asset_helper.py @@ -65,7 +65,10 @@ def validate_frame_resolution(resolution : str) -> bool: resolution_limit = 4096 frame_width, frame_height = unpack_resolution(resolution) - return frame_width < resolution_limit and frame_height < resolution_limit + if frame_width > resolution_limit or frame_height > resolution_limit: + return False + + return True def validate_file_size(upload_files : List[UploadFile]) -> bool: