-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/core#3034 Ensure that filename contains the file extension for PDFs #22532
Conversation
(Standard links)
|
Thanks @seamuslee001 just I'm not sure this is the correct solution, since it might double-append .pdf in some cases. I'm also not sure the reported reproduction steps are, or should be, a supported operation:
Maybe, just wondering if that ever was supported or is a weird artifact of the changes in 5.43+ |
@demeritcowboy I am summarising that $filename doesn't have the extension in it because of https://github.com/civicrm/civicrm-core/pull/22532/files#diff-02764055ac009532ffaa74e9add094b93fda105527f2bf8d3a8e7defe824aa8eR273 |
Except it does when you're initially creating the file. And I'm trying to even reproduce the issue and can't. Can you reproduce the reported issue?
|
I tried again to reproduce and can't. Have made comment in ticket: https://lab.civicrm.org/dev/core/-/issues/3034#note_70503 |
@demeritcowboy I think @seamuslee001 modification is right for these reasons:
|
jenkins retest this please |
Agreed. I might do a followup with at least a code comment because I think this happened because it's not obvious what gets set/removed where and the differences. And it turns out it's also different between firefox and chrome. |
Overview
This ensures that the file extension is within the content-disposition header when downloading a pdf file
Before
File extension may not be in the header
After
File extension is in the header and part of the file name
ping @eileenmcnaughton @demeritcowboy @colemanw