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

Duplicator Pro installer file cut #606

Open
pumka opened this issue Jan 29, 2024 · 0 comments
Open

Duplicator Pro installer file cut #606

pumka opened this issue Jan 29, 2024 · 0 comments

Comments

@pumka
Copy link

pumka commented Jan 29, 2024

We have a site with both Duplicator Pro and Really Simple SSL plugins installed. Duplicator Pro is a backup/copy site plugin, which generates a site archive and a PHP installer script for it. After downloading an installer it generated, we noticed it generates an error due to an unclosed comment tag at the very end:
image

My investigation revelated it was happening due to the "Mixed content fixer" function active in the Really Simple SSL plugin, which was filtering the content produced by an AJAX action serving the installer file content. More specifically, it was adding "data-rsssl=1" attributes to tags inside the script:
image

At the same time HTTP headers were already sent including the Content-Length, which was set to the original file length forcing the file to be cut at the same exact position. Thus causing the end of the file to be cut due to the content inserted in the middle.

While the "Mixed content fixer" feature could be switched off to prevent the installer file corruption, I believe Really Simple SSL plugin shouldn't filter the installer file at all. Unfortunately, this issue couldn't be reproduced with their free Duplicator plugin version as it uses slightly different code to output the installer file, which doesn't involve an output buffering. So it only applies to the paid Duplicator Pro version.

I suggest \rsssl_mixed_content_fixer::replace_insecure_links method should be modified to either ignore the case when HTTP headers are already sent (using headers_sent() function) or ignore "duplicator_pro_download_package_file" WP AJAX action.

I can provide patch files or make a pull request if needed.

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

No branches or pull requests

1 participant