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

Compressed output in PHP 8.0.17 or 8.1.4 breaks attachments #7395

Closed
Oldiesmann opened this issue Mar 26, 2022 · 3 comments · Fixed by #7400
Closed

Compressed output in PHP 8.0.17 or 8.1.4 breaks attachments #7395

Oldiesmann opened this issue Mar 26, 2022 · 3 comments · Fixed by #7400

Comments

@Oldiesmann
Copy link
Contributor

Description

Not sure if there's anything we can do about this, but tracking this here so it doesn't get lost. PHP 8.0.17 and 8.1.4 include a fix for a zlib bug, but the fix breaks attachments when compressed output is enabled. See php/php-src#8218 for more and php/php-src#7953 for the original issue that was patched.

Steps to reproduce

  1. Install SMF on a server with PHP 8.0.17 or 8.1.4 and enable compressed output.
  2. Attach an image to a post.

Environment (complete as necessary)

  • PHP Version: 8.0.17 or 8.1.4
@Sesquipedalian
Copy link
Member

Well, doesn't that just suck?

@jdarwood007
Copy link
Member

I've been meaning to get a env going with this since my current one is following a package maintainer version.

The bad part is these versions are currently the latest versions of their respective branches. So anyone building from scratch for those branches, will most likely be getting those versions. I am a bit confused as to why the original issue that caused the output handling issue was not traced back to see if it was from a recent change or not. The report only said 8.0.10 had the issue, but not if it worked in 8.0.9. Thus indicating a change occurred that broke the functionality. Which means this patch while it fixed that issue, caused another and didn't track the root cause.

From what i can tell in those discussions, a fix may be just to add the call to remove the header in our download attachment logic. Which while weird, would get it fixed until PHP has released a proper fix that doesn't muck around with headers when it didn't need to before.

@Sesquipedalian
Copy link
Member

From what i can tell in those discussions, a fix may be just to add the call to remove the header in our download attachment logic. Which while weird, would get it fixed until PHP has released a proper fix that doesn't muck around with headers when it didn't need to before.

That seems to have worked, but testing by others is needed to confirm: #7400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants