wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.38k stars 195 forks source link

Image Resizer fails if the input image's filename is too long #10

Closed LukeTowers closed 9 months ago

LukeTowers commented 3 years ago

The ImageResizer will fail with

file_put_contents(/srv/users/website-oc-newcriterion/apps/website-oc-newcriterion/releases/1611303973/storage/app/resized/0a0/086/dae/florence-flood-november-4-1966-view-from-the-south-bank-of-the-arno-river-florence-italy-the-river-rages-just-beneath-the-stone-arches-of-the-ponte-santa-trinita-photo-by-balthazar-korab-7-0-2018-1084-1612117156_resized_0a0086dae485c1984a4b736baeea002370fc98eb.jpg): failed to open stream: File name too long

if it attempts to resize /storage/app/media/florence-flood-november-4-1966-view-from-the-south-bank-of-the-arno-river-florence-italy-the-river-rages-just-beneath-the-stone-arches-of-the-ponte-santa-trinita-photo-by-balthazar-korab.jpg.

Now, why anyone would have files with such long names is beyond me, but the fact of the matter is there isn't anything in the system right now to prevent people from doing silly stuff like that, so it's unhandled when it's encountered.

@bennothommo any thoughts on the best way to deal with this sort of situation? The max path length is generally 255 bytes on most filesystems, but we'd also have to take into account the other parts of the path (the containing folder and the suffix detailing the options and extension).

github-actions[bot] commented 3 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 3 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 3 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 3 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 2 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 2 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 2 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 2 years ago

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months. If this issue is still relevant or you would like to see it actioned, please respond within 3 days. If this issue is critical for your business, please reach out to us at wintercms@luketowers.ca.

github-actions[bot] commented 1 year ago

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months. If this issue is still relevant or you would like to see it actioned, please respond within 3 days. If this issue is critical for your business, please reach out to us at wintercms@luketowers.ca.

github-actions[bot] commented 1 year ago

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months. If this issue is still relevant or you would like to see it actioned, please respond within 3 days. If this issue is critical for your business, please reach out to us at wintercms@luketowers.ca.

LukeTowers commented 9 months ago

Archiving, ping me to reopen if anyone else runs into this.