fix: reject undecodable JPEG without tables or with a bad scan header
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -298,6 +298,26 @@ def test_damaged_png_data(
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.spec("attachments", "Недекодируемый JPEG")
|
||||
def test_undecodable_jpeg(
|
||||
api: Api,
|
||||
alice: Actor,
|
||||
chat: dict[str, Any],
|
||||
) -> None:
|
||||
assert_errors(
|
||||
{
|
||||
name: api.post_attachment(
|
||||
alice,
|
||||
chat["id"],
|
||||
data,
|
||||
content_type="image/jpeg",
|
||||
)
|
||||
for name, data in images.jpeg_undecodable().items()
|
||||
},
|
||||
415,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.spec("attachments", "Хвост после конца изображения")
|
||||
def test_tail_after_end(
|
||||
api: Api,
|
||||
|
||||
Reference in New Issue
Block a user