(security) fix: enforce decoder prompt-length validation for skip-che… (#46588)

Signed-off-by: jperezde <jperezde@redhat.com>
This commit is contained in:
Juan Pérez de Algaba
2026-08-21 09:07:19 -07:00
committed by GitHub
parent b41dc4ec72
commit e00a034ad1
+1 -1
View File
@@ -438,7 +438,7 @@ class InputProcessor:
prompt_len: int, prompt_len: int,
prompt_type: Literal["encoder", "decoder"], prompt_type: Literal["encoder", "decoder"],
): ):
if self.skip_prompt_length_check: if self.skip_prompt_length_check and prompt_type == "encoder":
return return
if prompt_len == 0 and prompt_type == "decoder": if prompt_len == 0 and prompt_type == "decoder":