Skip to content

Fix ZIP downloads for external uploads directories - #439

Merged
patrickposner merged 1 commit into
masterfrom
patrickposner/fix-empty-zip-export
Jul 28, 2026
Merged

Fix ZIP downloads for external uploads directories#439
patrickposner merged 1 commit into
masterfrom
patrickposner/fix-empty-zip-export

Conversation

@patrickposner

Copy link
Copy Markdown
Collaborator

Fix ZIP URL resolution when WordPress stores uploads outside or symlinked away from WP_CONTENT_DIR by using the authoritative wp_upload_dir() filesystem-to-URL mapping.
Validate completed archives before reporting success and return actionable errors for missing, unreadable, or publicly inaccessible ZIP files.
Add regression tests for external uploads mappings and false-success prevention.
Tests: vendor/bin/phpunit (356 tests, 4,531 assertions), plus a successful WordPress 7.0.2/PHP 8.4 Playground export.

@patrickposner
patrickposner merged commit f5380bf into master Jul 28, 2026
12 checks passed
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

Successfully merging this pull request may close these issues.

1 participant