mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-05 08:05:12 +00:00
- Only the payload of a verified image is replaced; the media type and parameters stay in the scan so prose cannot be smuggled through them. - The payload is located by regexp submatch indices instead of a case-folded copy, so non-ASCII header characters cannot shift it. - The whole payload must strictly decode to a PNG/JPEG/GIF/WEBP file with its trailer; padding is only accepted at the end. - Skip the regexp entirely when the text has no ;base64, marker.