Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have installed levelten_apps and it is downloading images like the one from this URL:
http://apps.leveltendesign.com/sites/default/files/screenshots/webform_s...
which is a wrong url. Method apps_retrieve_app_image should check if it has downloaded a right image before saving it to drupal public files.
I'm attaching a possible patch
Comment | File | Size | Author |
---|---|---|---|
#4 | apps-http_request_fail.patch | 597 bytes | jnorell |
#2 | reject-broken-images-1665048-2.patch | 783 bytes | sylus |
#1 | reject-broken-images-1665048-1.patch | 831 bytes | sylus |
patch_to_reject_broken_images1.patch | 944 bytes | hablutzel1 |
Comments
Comment #1
sylus CreditAttribution: sylus commentedPatch works great for me and fixed a whack of problems when an app is installed locally using a manifest.app and the file permissions make the screenshot + logo inaccessible.
Rerolled the patch so will work with drush make.
Should also likely be used in conjunction with:
http://drupal.org/node/1721538
Comment #2
sylus CreditAttribution: sylus commentedApplied to wrong branch here is the proper patch
Comment #3
febbraro CreditAttribution: febbraro commentedWhat is this part of the patch doing?
Comment #4
jnorell CreditAttribution: jnorell commentedHere's an alternate patch that fixes the same error for missing webform_screenshot.png in a different approach - it returns current file info if the http request has an error. Probably use both the above to not save the bad ".png" file and this one to handle missing files in http requests even if the current file is valid.
(See also http://drupal.org/node/1908824)
Comment #5
pfrenssenMarking this as a duplicate of #2081587: When an app tries to download an invalid logo a random placeholder file is created as that issue has a patch that applies to the current HEAD, and also checks if the downloaded file is an actual image.