This commit is contained in:
2026-10-30 21:09:56 +03:00
parent ec540a1a72
commit 3223dd469a
87 changed files with 15475 additions and 33 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
# JPEG bytes with Content-Type: image/png → 415 (content wins over header).
set -eu
. "$(dirname "$0")/lib.sh"
jpg="$FIXTURES/tiny.jpg"
[ -f "$jpg" ] || die "missing fixture $jpg"
register_user alice
create_chat 'mime-spoof' "[\"$USER_ID\"]"
upload_file "$CHAT_ID" "$jpg" 'spoof.png' 'image/png'
expect_code 415
code=$(printf '%s' "$HTTP_BODY" | jq -r .error.code)
assert_eq "$code" unsupported_media_type error_code
printf 'PASS test_attachment_mime_spoof\n'