v1.4.2
This commit is contained in:
parent
6a8de6e2e2
commit
a80a4aa4f9
8168 changed files with 3186001 additions and 9155 deletions
271
readme.txt
271
readme.txt
|
|
@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares
|
|||
Tags: media, upload, s3, cdn, storage, idrivee2, cloud
|
||||
Requires at least: 5.3
|
||||
Tested up to: 7.1
|
||||
Stable tag: 1.4.1
|
||||
Stable tag: 1.4.2
|
||||
Requires PHP: 8.1
|
||||
Version: 1.4.1
|
||||
Version: 1.4.2
|
||||
License: GPL-3.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
|
|
@ -40,10 +40,25 @@ iDrivee2 Media Upload is a WordPress plugin that automatically uploads media fil
|
|||
|
||||
**Requirements:**
|
||||
|
||||
* WordPress 6.8 or higher
|
||||
* PHP 8.2, 8.3, or 8.4
|
||||
* WordPress 5.3 or higher
|
||||
* PHP 8.1 to 8.5
|
||||
* MariaDB 10.6+ or MySQL 5.7+
|
||||
* S3-compatible storage (iDrivee2, AWS S3, DigitalOcean Spaces, etc.)
|
||||
* For automatic updates: the [ROBOTSTXT Manager](https://www.robotstxt.software/plugins/robotstxt-manager/) plugin installed and active
|
||||
|
||||
== Using the plugin ==
|
||||
|
||||
= WP-CLI =
|
||||
|
||||
The plugin provides three WP-CLI commands for operations and diagnostics:
|
||||
|
||||
* `wp idrivee2 test-connection` — verify that the S3 bucket is accessible with the configured credentials
|
||||
* `wp idrivee2 cleanup-local-files` — manually run the local file cleanup that normally runs via WP-Cron every 5 minutes
|
||||
* `wp idrivee2 stats --days=N` — show S3 operation statistics for the last N days (default: 7, max: 30)
|
||||
|
||||
= Automatic updates =
|
||||
|
||||
Plugin updates are delivered through the [ROBOTSTXT Manager](https://www.robotstxt.software/plugins/robotstxt-manager/) plugin. When it is not installed and active, the plugin shows a dismissible notice on the Plugins page and a persistent notice on Settings → iDrivee2.
|
||||
|
||||
== Extra Configurations ==
|
||||
|
||||
|
|
@ -178,27 +193,60 @@ Yes. The URL rewriting happens at the WordPress level, so it works with all cach
|
|||
|
||||
= What PHP version is required? =
|
||||
|
||||
PHP 8.2 or higher is required. The plugin uses strict type declarations and is tested on PHP 8.2, 8.3, and 8.4.
|
||||
PHP 8.1 or higher is required. The plugin uses strict type declarations and is tested on PHP 8.1 to 8.5.
|
||||
|
||||
= How does this plugin receive updates? =
|
||||
|
||||
Updates are delivered through the [ROBOTSTXT Manager](https://www.robotstxt.software/plugins/robotstxt-manager/) plugin. Install and activate it to receive automatic updates.
|
||||
|
||||
== Compatibility ==
|
||||
|
||||
* WordPress: 6.8 - 7.1
|
||||
* PHP: 8.2 - 8.5
|
||||
* WordPress: 5.3 - 7.1
|
||||
* PHP: 8.1 - 8.5
|
||||
* MariaDB: 10.6+
|
||||
* MySQL: 5.7+
|
||||
|
||||
**Code Quality:**
|
||||
|
||||
* PHP Coding Standards: 0 errors
|
||||
* WordPress Coding Standards (WPCS): 3.3 (0 violations)
|
||||
* PHP Coding Standards: 3.13.6 (0 errors)
|
||||
* WordPress Coding Standards (WPCS): 3.4.1 (0 violations)
|
||||
* PHPStan: Level 9 (0 errors, maximum strictness)
|
||||
* PHP Coding Standards: 0 errors
|
||||
* WordPress Coding Standards (WPCS): 3.3 (0 violations)
|
||||
* PHPStan: Level 9 (0 errors, maximum strictness)
|
||||
* PHPCompatibility: 8.2-8.5 (fully compatible)
|
||||
* PHPCompatibility: 8.1-8.5 (fully compatible)
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.4.2 =
|
||||
|
||||
_Release date: 2026-08-17_
|
||||
|
||||
**Added**
|
||||
|
||||
* Dismissible admin notice on the Plugins page when the ROBOTSTXT Manager plugin is not installed or active, linking to https://www.robotstxt.software/plugins/robotstxt-manager/
|
||||
* Persistent (non-dismissible) notice on Settings → iDrivee2 under the same condition
|
||||
|
||||
**Changed**
|
||||
|
||||
* Removed the bundled Gitea auto-updater (`robotstxt-updater.php` and `update.json`); automatic updates are now handled by the ROBOTSTXT Manager plugin
|
||||
* Plugin URI and new `Update URI` header point to https://www.robotstxt.software/plugins/idrivee2-media-upload/
|
||||
* Author URI updated to https://www.robotstxt.software/
|
||||
* Composer dependencies updated (aws-sdk-php 3.392.3, guzzle 8.0.2, no known CVEs)
|
||||
|
||||
**Localization**
|
||||
|
||||
* POT regenerated for 1.4.2; Spanish (es_ES) and Catalan (ca) translations updated — 69/69 strings in both locales
|
||||
|
||||
**Compatibility**
|
||||
|
||||
* WordPress: 5.3 - 7.1
|
||||
* PHP: 8.1 - 8.5
|
||||
|
||||
**Tests**
|
||||
|
||||
* PHP Coding Standards: 3.13.6 (0 errors)
|
||||
* WordPress Coding Standards: 3.4.1 (0 violations)
|
||||
* PHPStan: Level 9, 0 errors
|
||||
* PHPUnit: 78 tests, 125 assertions
|
||||
|
||||
= 1.4.1 =
|
||||
|
||||
_Release date: 2026-08-10_
|
||||
|
|
@ -276,202 +324,9 @@ _Release date: 2026-07-18_
|
|||
* PHPStan: Level 9, 0 errors
|
||||
* PHPUnit: 38 tests, 60 assertions
|
||||
|
||||
= 1.2.1 =
|
||||
|
||||
_Release date: 2026-06-05_
|
||||
|
||||
**Fixed**
|
||||
|
||||
* **Infinite recursion on image upload** — `wp_update_post()` (used to update the attachment GUID to the S3/CDN URL) was firing the `edit_attachment` WordPress action, which re-triggered the upload method, causing infinite recursion. WordPress reported "The server cannot process the image." Fixed by removing the `edit_attachment` hook (unnecessary — `wp_update_attachment_metadata` covers all new-upload scenarios) and adding a per-attachment re-entry guard.
|
||||
* **Fatal error: `fclose()` on already-closed stream** — The AWS SDK closes file streams automatically after upload. The cleanup block was calling `fclose()` on already-closed streams, throwing a `TypeError`. Fixed by checking `is_resource()` before closing.
|
||||
|
||||
**Compatibility**
|
||||
|
||||
* WordPress: 4.1 - 7.1
|
||||
* PHP: 8.1 - 8.5
|
||||
|
||||
**Tests**
|
||||
|
||||
* PHP Coding Standards: 3.13.5 (0 errors)
|
||||
* WordPress Coding Standards: 3.3.0 (0 violations)
|
||||
* PHPStan: Level 9, 0 errors
|
||||
* PHPUnit: 22 tests, 54 assertions
|
||||
|
||||
= 1.2.0 =
|
||||
|
||||
_Release date: 2026-06-02_
|
||||
|
||||
**Highlights**
|
||||
|
||||
* Media uploads now run concurrently — dramatically faster for bulk imports
|
||||
* Files stream directly from disk; no full load into memory
|
||||
|
||||
**Performance**
|
||||
|
||||
* Concurrent S3 uploads via AWS `CommandPool` (default 5 simultaneous, tunable via `IDRIVEE2_UPLOAD_CONCURRENCY` in wp-config.php)
|
||||
* Files streamed directly from disk using native PHP streams instead of loading entirely into memory — critical for large images
|
||||
* Removed per-file `headObject` pre-check — files are assumed new (they just came from WordPress thumbnail generation)
|
||||
* Single DB write for upload statistics per attachment instead of one per file
|
||||
* Hook priority lowered from 999 to 10 — no unnecessary delay
|
||||
|
||||
**Compatibility**
|
||||
|
||||
* WordPress: 4.1 - 7.1
|
||||
* PHP: 8.1 - 8.5
|
||||
|
||||
**Tests**
|
||||
|
||||
* PHP Coding Standards: 3.13.5 (0 errors)
|
||||
* WordPress Coding Standards: 3.3.0 (0 violations)
|
||||
* PHPStan: Level 9, 0 errors
|
||||
* PHPUnit: 22 tests, 54 assertions
|
||||
|
||||
= 1.1.4 =
|
||||
|
||||
_Release date: 2026-06-02_
|
||||
|
||||
**Added**
|
||||
|
||||
* Composer dev tooling: PHPCS, WPCS, PHPStan (level 9), PHPUnit, PHPCompatibility
|
||||
* phpstan.neon, phpcs.xml, phpunit.xml configuration files
|
||||
* PHPUnit test suite: plugin header tests, Config and Rate_Limiter unit tests (22 tests, 54 assertions)
|
||||
* bin/deploy.sh: automated distributable ZIP generation with production-only vendor
|
||||
* docs/ directory: db-migrations.md, known-issues.md
|
||||
|
||||
**Changed**
|
||||
|
||||
* Tested up to WordPress 7.1
|
||||
* PHP compatibility declared: 8.2–8.5
|
||||
* PHPStan raised from level 8 to level 9 (0 errors)
|
||||
* PHPCS raised to full WordPress-Core, WordPress-Docs, WordPress-Extra compliance (0 errors)
|
||||
* `IDRIVEE2_MEDIA_VERSION` constant introduced; replaces `get_file_data()` call in admin script enqueue
|
||||
* Admin page: `$_GET['page']` now properly sanitized with `sanitize_key()`
|
||||
* Admin page: `$_POST['test_file']` type-checked before `sanitize_file_name()`
|
||||
* deploy.sh: switched from `composer update` to `composer install` for reproducible builds
|
||||
* Logger stats: UTC-consistent date arithmetic (`time() - ($n * DAY_IN_SECONDS)`)
|
||||
* uninstall.php: variable renamed to `$idrivee2_next_scheduled` (WP prefix rule)
|
||||
|
||||
**Fixed**
|
||||
|
||||
* WP_Filesystem null guard in `Media_Uploader::upload_attachment_to_idrivee2()` and `cleanup_local_files()`
|
||||
* Type safety: all `get_option()`/`get_transient()` mixed values now narrowed before use
|
||||
* Deletion queue: entries with malformed timestamp now requeued instead of deleted immediately
|
||||
* robotstxt-updater.php: short ternary operators replaced, `serialize()` annotated with justification
|
||||
* Rate_Limiter: transient value narrowed to int before arithmetic operations
|
||||
|
||||
**Compatibility**
|
||||
|
||||
* WordPress: 6.8 - 7.1
|
||||
* PHP: 8.2 - 8.5
|
||||
|
||||
**Tests**
|
||||
|
||||
* PHP Coding Standards: 3.13.5 (0 errors)
|
||||
* WordPress Coding Standards: 3.3.0 (0 violations)
|
||||
* PHPStan: Level 9 (0 errors)
|
||||
* PHPCompatibility: 8.2-8.5
|
||||
|
||||
= 1.1.2 =
|
||||
|
||||
_Release date: 2026-02-04_
|
||||
|
||||
**Changed**
|
||||
|
||||
* Deployment script updated to use PHP 8.2 as platform base for production builds
|
||||
* Now uses composer update --no-dev instead of composer install --no-dev for consistent dependency resolution
|
||||
* Temporarily configures platform.php 8.2 during build, then cleans up
|
||||
|
||||
**Improved**
|
||||
|
||||
* Production packages now guarantee PHP 8.2+ compatibility regardless of development environment PHP version
|
||||
* Build consistency ensures reliable deployments across different server environments
|
||||
|
||||
= 1.1.1 =
|
||||
|
||||
_Release date: 2026-02-04_
|
||||
|
||||
**Fixed**
|
||||
|
||||
* Deployment script now includes essential files (update.json, robotstxt-updater.php, readme.txt, changelog.txt)
|
||||
* Production packages now contain all files required for automatic updates from Gitea
|
||||
|
||||
= 1.1.0 =
|
||||
|
||||
_Release date: 2026-02-04_
|
||||
|
||||
**Changed**
|
||||
|
||||
* Added explicit PHP version requirement (>=8.2) to composer.json
|
||||
* Updated update.json with correct plugin information
|
||||
* Fixed Text Domain in robotstxt-updater.php to match plugin slug (idrivee2-media-upload)
|
||||
* Migrated repository from GitHub to Gitea (git.robotstxt.es)
|
||||
* Added Gitea Plugin URI and Primary Branch headers
|
||||
|
||||
**Fixed**
|
||||
|
||||
* Composer now validates PHP version during dependency installation
|
||||
* Plugin update system correctly identifies the plugin
|
||||
* Translations properly loaded for updater error messages
|
||||
|
||||
**Improved**
|
||||
|
||||
* All text domains now consistently use 'idrivee2-media-upload'
|
||||
* Update metadata accurately reflects plugin information
|
||||
|
||||
= 1.0.0 =
|
||||
|
||||
_Release date: 2026-02-03_
|
||||
|
||||
**Added**
|
||||
|
||||
* Security logging system with comprehensive audit trail
|
||||
* Rate limiting protection (60s users, 30s admins)
|
||||
* S3 operation statistics tracking (30-day retention)
|
||||
* Logger class for security and operations logging
|
||||
* Rate_Limiter class for abuse prevention
|
||||
* Comprehensive security audit documentation (7,500+ lines)
|
||||
* Code quality report with metrics (3,200+ lines)
|
||||
|
||||
**Security**
|
||||
|
||||
* OWASP Top 10 (2021) 100% compliance
|
||||
* Enhanced nonce validation
|
||||
* Comprehensive input sanitization and output escaping
|
||||
* Security logging for all critical operations
|
||||
* Security rating: A+ (Excellent)
|
||||
|
||||
**Fixed**
|
||||
|
||||
* All 17 PHPStan level 8 type safety issues resolved
|
||||
* Array type specifications added to all methods
|
||||
* Null handling for AWS error messages
|
||||
* Return type declarations match actual returns
|
||||
|
||||
= 0.3.0 =
|
||||
|
||||
_Release date: 2025-02-03_
|
||||
|
||||
**Added**
|
||||
|
||||
* Settings page in WordPress Admin (Settings → iDrivee2)
|
||||
* Class-based architecture with 6 classes
|
||||
* PHPUnit test structure
|
||||
* PHPStan static analysis
|
||||
* Deployment script (bin/deploy.sh)
|
||||
|
||||
**Changed**
|
||||
|
||||
* Menu location from Media → iDrivee2 to Settings → iDrivee2
|
||||
* Architecture from functional to object-oriented
|
||||
|
||||
**Fixed**
|
||||
|
||||
* Code duplication eliminated (7 instances)
|
||||
* WordPress Coding Standards violations
|
||||
|
||||
= Previous versions =
|
||||
|
||||
If you want to see the full changelog, visit the [changelog.txt](https://git.robotstxt.es/ROBOTSTXT/idrivee2-media-upload/raw/branch/main/changelog.txt) file.
|
||||
If you want to see the full changelog, visit the [plugin page](https://www.robotstxt.software/plugins/idrivee2-media-upload/).
|
||||
|
||||
== Compliance ==
|
||||
|
||||
|
|
@ -483,7 +338,7 @@ This plugin adheres to the following security measures and review protocols for
|
|||
* [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards)
|
||||
* [Plugin Check (PCP)](https://wordpress.org/plugins/plugin-check/)
|
||||
* [OWASP Top 10 (2021)](https://owasp.org/Top10/)
|
||||
* [PHPStan Level 8](https://phpstan.org/user-guide/rule-levels)
|
||||
* [PHPStan Level 9](https://phpstan.org/user-guide/rule-levels)
|
||||
|
||||
**Security Audit:**
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue