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

footer.twig gets printed to Binary File Download #19041

Closed
Keden92 opened this issue Mar 9, 2024 · 3 comments
Closed

footer.twig gets printed to Binary File Download #19041

Keden92 opened this issue Mar 9, 2024 · 3 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@Keden92
Copy link

Keden92 commented Mar 9, 2024

Describe the bug

If i download "a File" from a blob Column, the content of "templates/footer.twig" gets appanedet to the File.
-> The file is getting corrupt.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Table with a blob Column (Transformation: Application/Octetstream: Download)
  2. Upload a File
  3. Download the File
  4. Open with a text-editor, there will be appendet the content of the "templates/footer.twig" File.

Expected behavior

The footer does not get appendet.

Screenshots

PMABug

Server configuration

  • Operating system: Debian
  • Web server: Apache/2.4.38 (Debian)
  • Database version: 10.5.18-MariaDB-0+deb11u1-log - Debian 11
  • PHP version: 7.3.31-1~deb10u2
  • phpMyAdmin version: 5.2.1

Client configuration

  • Browser: Firefox 115.8.0esr (64-Bit)
  • Operating system: Win 10
@williamdes
Copy link
Member

Thank you for this detailed bug report !

@williamdes williamdes added Bug A problem or regression with an existing feature affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) affects/6.0 This issue or pull-request affects 6.0.x releases (and maybe further versions) labels Mar 9, 2024
@williamdes williamdes added this to the 5.2.2 milestone Mar 9, 2024
@Keden92
Copy link
Author

Keden92 commented Mar 9, 2024

Temporary fixed by adding
$this->response->disable();
to
public function __invoke(): void
in libraries/classes/Controllers/Transformation/WrapperController.php

@williamdes williamdes self-assigned this Apr 28, 2024
@williamdes williamdes added has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete and removed affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) affects/6.0 This issue or pull-request affects 6.0.x releases (and maybe further versions) labels Apr 28, 2024
williamdes added a commit that referenced this issue Apr 28, 2024
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes
Copy link
Member

williamdes commented Apr 28, 2024

Thank you, I pushed 892dda0
Edit: tested & working 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
None yet
Development

No branches or pull requests

2 participants