Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding useful feedback to Gd2.php exceptions #1339

Merged
merged 1 commit into from
Dec 30, 2022

Conversation

loekvangool
Copy link
Contributor

@loekvangool loekvangool commented Dec 11, 2020

Description

Manual testing scenarios

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* labels Dec 11, 2020
@colinmollenhour
Copy link
Member

Are these exceptions ever visible to users or are they just logged?

@loekvangool
Copy link
Contributor Author

loekvangool commented Dec 12, 2020

I got this thrown at the admin user by an extension that creates a product feed for a SaaS search solution. The exception caused complete failure of the feed generation job. A message like does not contain enough information to be called "actionable" imo, and thus has to be expanded and we should probably consider not creating exceptions for this at all (all that happened was that there were a few stray BMP and TIFF images in the media dir). Also, the Mage frontend did not display these images for the accompanying products. There actually was no message logged in any of these cases, maybe we should add Mage::logException() calls as well. If this happens during a cron job it will just fail silently.

Lastly, we might consider merging https://github.com/magento-hackathon/Perfect_Watermarks for imagemagick support (I see you have forked that repo already).

@ADDISON74
Copy link
Collaborator

ADDISON74 commented Dec 12, 2020

Lastly, we might consider merging https://github.com/magento-hackathon/Perfect_Watermarks for imagemagick support (I see you have forked that repo already).

This project was not updated for more than 6 years. It is based on imaginemagick which had security issues. Just read an issue posted in 2016 here magento-hackathon/Perfect_Watermarks#24.

@loekvangool
Copy link
Contributor Author

Lastly, we might consider merging https://github.com/magento-hackathon/Perfect_Watermarks for imagemagick support (I see you have forked that repo already).

This project was not updated for more than 6 years. It is based on imaginemagick which had security issues. Just read an issue posted in 2016 here magento-hackathon/Perfect_Watermarks#24.

The code could be updated.

The security issue is easily mitigated, for instance for CentOS see https://access.redhat.com/security/vulnerabilities/ImageTragick.

@luigifab
Copy link
Collaborator

Someone have a test script to test this PR?

Copy link
Collaborator

@ADDISON74 ADDISON74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if I don't consider the wording "was" appropriate the change is useful to identify where the error comes from.

@fballiano fballiano merged commit 3dcbdca into OpenMage:1.9.4.x Dec 30, 2022
fballiano pushed a commit to fballiano/openmage that referenced this pull request Dec 30, 2022
@loekvangool
Copy link
Contributor Author

Even if I don't consider the wording "was" appropriate the change is useful to identify where the error comes from.

Yeah agreed, made a new PR

@loekvangool loekvangool deleted the patch-8 branch December 30, 2022 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants