Bug 880006

Summary: Captcha image doesn't display
Product: [Fedora] Fedora Reporter: Joel <jdy>
Component: gallery2Assignee: Gwyn Ciesla <gwync>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17CC: gwync, jdy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-02 04:29:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joel 2012-11-26 00:16:30 UTC
When submitting comments, the Captcha image doesn't display.  This message appears in the logs:

PHP Warning:  imagejpeg(): Filename cannot be empty in /usr/share/gallery2/modules/captcha/CaptchaImage.inc on line 91, referer: https://XXXX.com/gallery2/main.php?g2_view=comment.AddComment&g2_itemId=20235&g2_return=%2Fgallery2%2Fv%2FYYYYYY%2F%3F

Problem is the call to ImageJPEG in CaptchaImage.inc.  Second argument is empty string, but that needs to be NULL these days.  diff to
modules/captcha/CaptchaImage.inc:

--- CaptchaImage.inc.orig	2012-11-25 16:12:02.838684229 -0800
+++ CaptchaImage.inc	2012-11-25 16:12:08.733601285 -0800
@@ -88,7 +88,7 @@
 
 	/* Output the image and reclaim the memory it used */
 	/* Use low quality jpeg compression to make the image less OCR-able */
-	ImageJPEG($image, '', 50);
+	ImageJPEG($image, NULL, 50);
 	ImageDestroy($image);
 
 	return null;


Joel

Comment 1 Joel 2012-11-26 18:09:18 UTC
FYI: upstream report: http://gallery.menalto.com/node/109994

Comment 2 Fedora Update System 2012-11-27 14:20:15 UTC
gallery2-2.3.2-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/gallery2-2.3.2-5.fc18

Comment 3 Fedora Update System 2012-11-27 14:20:33 UTC
gallery2-2.3.2-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/gallery2-2.3.2-5.fc17

Comment 4 Fedora Update System 2012-11-28 02:05:23 UTC
Package gallery2-2.3.2-5.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gallery2-2.3.2-5.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19138/gallery2-2.3.2-5.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-12-02 04:29:45 UTC
gallery2-2.3.2-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2012-12-06 07:07:49 UTC
gallery2-2.3.2-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.