[us-commits] [ehb54/us3lims_newinst] 07181d: Fix captcha HTTP 500 with ImageMagick >= 6.9.13-45...

emre brookes noreply at github.com
Thu Sep 10 00:56:06 MDT 2026


  Branch: refs/heads/ehb54-issue-1057
  Home:   https://github.com/ehb54/us3lims_newinst
  Commit: 07181d670f97425c09a9b993ed3bad4c8c1a7a7c
      https://github.com/ehb54/us3lims_newinst/commit/07181d670f97425c09a9b993ed3bad4c8c1a7a7c
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M cap_bg.jpg
    M create_captcha.php

  Log Message:
  -----------
  Fix captcha HTTP 500 with ImageMagick >= 6.9.13-45 (empty EXIF in cap_bg.jpg)

cap_bg.jpg carried an empty EXIF profile (6-byte header + 14-byte TIFF
body with zero entries). ImageMagick 6.9.13-45+ fails WriteImage() when
SyncExifProfile() rejects an EXIF body shorter than 16 bytes, without
raising an exception, so Imagick::getImageBlob() throws the generic
"empty or invalid image" error and create_captcha.php returns 500.

- strip all metadata from cap_bg.jpg losslessly (jpegtran -copy none;
  pixels unchanged)
- call stripImage() after loading the background so any future
  background file is safe regardless of its metadata

Fixes ehb54/ultrascan-tickets#1057

Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/ehb54/us3lims_newinst/settings/notifications


More information about the us-commits mailing list