You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, there is a compatibility issue between your plugin and WooCommerce Admin reports export functionality. Basically, your stream wrapper, even when running on filesystem locally, using fopen and whole rest of the team, doesn't preserve its behavior when it comes to handling empty files, preventing it from being created at all and silently breaking whole export functionality, which depends on handling previously created, empty files to write to.
Steps to reproduce:
Have existing running WooCommerce store with WooCommerce Admin and some transactions history for export (more than 25/one page) to trigger multipass export flow
Go to Statistics, click "export"
Observe empty uploads/woocommerce_uploads/reports/index.htmlnot being created (serious security risk) and .csvs not being generated at all, besides of properly generated and saved, not-empty .htaccess, and link to non-existing file being emailed to your user email.
or, if you don't have a shop running, just run this code from your functions/mu-plugin to test just it:
Hi, there is a compatibility issue between your plugin and WooCommerce Admin reports export functionality. Basically, your stream wrapper, even when running on filesystem locally, using
fopen
and whole rest of the team, doesn't preserve its behavior when it comes to handling empty files, preventing it from being created at all and silently breaking whole export functionality, which depends on handling previously created, empty files to write to.Steps to reproduce:
uploads/woocommerce_uploads/reports/index.html
not being created (serious security risk) and.csv
s not being generated at all, besides of properly generated and saved, not-empty.htaccess
, and link to non-existing file being emailed to your user email.or, if you don't have a shop running, just run this code from your functions/mu-plugin to test just it:
(based on
woocommerce/packages/woocommerce-admin/src/ReportCSVExporter.php:maybe_create_directory
, entry point for export functionality)Tested on v0.5.3 and v0.7.0, breaks just the same.
The text was updated successfully, but these errors were encountered: