Skip to content

Releases: souldret/chapter-uploader

V1.8.0

Choose a tag to compare

@souldret souldret released this 05 Aug 18:26

[1.8.0] - 2026-08-05 - Security Hardening & Performance Release

This release consolidates all fixes from v1.7.2 and adds final security/performance hardening identified during a full code review pass.

Security

  • FIXED (Critical): MCU_AdvancedFetcher::fetch_from_mangadex() was called as fetch_from_mangadex but defined as fetch_from_mangadx — caused a PHP fatal error when fetching from mangadex.org.
  • FIXED: Added missing current_user_can('upload_files') permission checks to handle_test_blogger_url, handle_auto_increment_chapter, and handle_finalize_upload AJAX handlers.
  • FIXED: Added SSRF protection to URL fetch handlers — only http/https schemes allowed, blocked-domain list (MCU_RateLimiter::is_url_blocked) is now enforced.
  • FIXED: Added path traversal protection in process_single_chapter_from_session — folder names are validated with realpath() against the session extract path.
  • FIXED: handle_multiple_chapters_upload and prepare_zip_upload crashed with PHP fatal error when no ZIP file was uploaded (null array access). Added is_array guards.
  • FIXED: cleanup_temp_dir path validation could pass on realpath() returning false. Added explicit false checks.

Bug Fixes

  • FIXED: Removed global remove_filter('intermediate_image_sizes_advanced', '__return_empty_array') call in create_chapter_from_images that could break image generation for other plugins site-wide.
  • FIXED: extract_images_from_html now converts relative image URLs (/path/img.jpg) to absolute URLs using the base URL of the fetched page.
  • FIXED: Single chapter upload rejected chapter number 0 due to empty() check. Now uses strict === '' comparison.
  • FIXED: cleanup_chapter_images_on_deletescandir() returning false no longer causes a PHP warning.
  • FIXED: push_series_to_latest_update$update_result is now initialized before the retry loop.
  • FIXED: deactivate() now also clears mcu_publish_scheduled_chapter cron events.

Performance

  • Optimized: Chapter duplicate detection rewritten as a single indexed SQL query (was: fetch all chapter post IDs then N× get_post_meta calls). Applied in single upload, ZIP batch processor, and REST API.
  • Optimized: Admin page chapter counts are now fetched in one GROUP BY query instead of one query per manga (N+1 fix).
  • Optimized: Removed redundant $wpdb->replace() calls in push_series_to_latest_updateupdate_post_meta() already handles insert/update.
  • Optimized: Transient cleanup queries now use prefix-only LIKE 'value%' patterns (index-friendly) instead of leading-wildcard LIKE '%value%'.
  • Optimized: Logger only persists WARNING+ entries to the database option; DEBUG/INFO go to the log file only, reducing wp_options write load.
  • Optimized: Admin manga list query uses no_found_rows => true to skip SQL_CALC_FOUND_ROWS.

[1.7.2] - 2026-08-05 - Bug Fixes & Performance

Bug Fixes

  • FIXED (Critical): MCU_AdvancedFetcher::fetch_from_mangadex() was called as fetch_from_mangadex but defined as fetch_from_mangadx — caused a PHP fatal error when fetching from mangadex.org.
  • FIXED (Security): Added missing current_user_can('upload_files') permission checks to handle_test_blogger_url, handle_auto_increment_chapter, and handle_finalize_upload AJAX handlers.
  • FIXED (Security): Added SSRF protection to URL fetch handlers — only http/https schemes allowed, blocked-domain list (MCU_RateLimiter::is_url_blocked) is now enforced.
  • FIXED (Security): Added path traversal protection in process_single_chapter_from_session — folder names are validated with realpath() against the session extract path.
  • FIXED: Removed global remove_filter('intermediate_image_sizes_advanced', '__return_empty_array') call in create_chapter_from_images that could break image generation for other plugins site-wide.
  • FIXED: handle_multiple_chapters_upload and prepare_zip_upload crashed with PHP fatal error when no ZIP file was uploaded (null array access). Added is_array guards.
  • FIXED: cleanup_temp_dir path validation could pass on realpath() returning false. Added explicit false checks.
  • FIXED: extract_images_from_html now converts relative image URLs (/path/img.jpg) to absolute URLs using the base URL of the fetched page.
  • FIXED: Single chapter upload rejected chapter number 0 due to empty() check. Now uses strict === '' comparison.
  • FIXED: cleanup_chapter_images_on_deletescandir() returning false no longer causes a PHP warning.
  • FIXED: push_series_to_latest_update$update_result is now initialized before the retry loop.
  • FIXED: deactivate() now also clears mcu_publish_scheduled_chapter cron events.

Performance

  • Optimized: Chapter duplicate detection rewritten as a single indexed SQL query (was: fetch all chapter post IDs then N× get_post_meta calls). Applied in single upload, ZIP batch processor, and REST API.
  • Optimized: Admin page chapter counts are now fetched in one GROUP BY query instead of one query per manga (N+1 fix).
  • Optimized: Removed redundant $wpdb->replace() calls in push_series_to_latest_updateupdate_post_meta() already handles insert/update.
  • Optimized: Transient cleanup queries now use prefix-only LIKE 'value%' patterns (index-friendly) instead of leading-wildcard LIKE '%value%'.
  • Optimized: Logger only persists WARNING+ entries to the database option; DEBUG/INFO go to the log file only, reducing wp_options write load.
  • Optimized: Admin manga list query uses no_found_rows => true to skip SQL_CALC_FOUND_ROWS.

[1.7.1] - 2026-06-22 - Bug Fixes

This release fixes critical bugs discovered during code review of v1.7.0.

Bug Fixes

  • Fixed: MCU_ZipProcessor::safe_recursive_delete was private, causing errors when cleaning up chapter images. Added dedicated safe_delete_directory() method to the main class.
  • Fixed: wp_cache_flush_group() is not a standard WordPress function, removed invalid calls.
  • Fixed: wp_cache_delete('all', 'posts') invalid call removed from batch processor.
  • Fixed: cleanup_chapter_images_on_delete had logic error with realpath validation - function would exit early if directory doesn't exist.
  • Fixed: Added missing is_dir() check before path validation in cleanup function.
  • Fixed: Indentation issue in cleanup_chapter_images_on_delete.

V1.7.0

Choose a tag to compare

@souldret souldret released this 22 Jun 16:52

[1.7.0] - 2026-06-22 - Security & Performance Update

This update focuses on security improvements, performance optimizations, and code quality enhancements.

Security Improvements

  • Path Traversal Protection: Added validation for chunk upload IDs (alphanumeric only) and local ZIP file paths to prevent directory traversal attacks.
  • File Extension Validation: Chunk uploads now only accept ZIP files.
  • Rate Limiting: Added rate limiting to ZIP preparation endpoint.
  • Secure Path Validation: Chapter image cleanup now validates paths before deletion.
  • Nonce Consistency: Unified nonce verification across all AJAX handlers.

Performance Optimizations

  • Targeted Cache Clearing: Replaced aggressive wp_cache_flush() calls with specific clean_post_cache().
  • Optimized Option Loading: Added autoload=no to large option data (logs, batch queue).
  • Improved Duplicate Detection: Chapter duplicate checking now uses floatval normalization.
  • Reduced Timeout: Changed download_url() timeout from 300s to 30s.

Code Quality

  • Unified Title Creation: Created shared MangaChapterUploader::create_chapter_title() and MangaChapterUploader::get_prefix_text() methods.
  • Removed Duplicate Code: Eliminated redundant cron schedule definitions.
  • Enhanced Validation: Improved input validation across all handlers.

V1.5.0

Choose a tag to compare

@souldret souldret released this 21 Apr 19:51
0ed7763

[1.5.0] - 2026-04-21 - Bug Fix & Code Quality Release 🛠️

This release focuses on resolving logic errors, code quality improvements, and stability fixes identified through code review. No new user-facing features are introduced; all changes improve reliability and correctness.

🐛 Bug Fixes

manga-uploader-extensions.php

  • FIXED: Variable shadowing in fetch_from_webtoons() — the $url function parameter was being silently overwritten inside the foreach loop processing image URLs, causing the wrong URL to be passed to extract_chapter_from_webtoons_url(). Renamed loop variable to $img_url.
  • FIXED: Dead code / incorrect ternary in update_manga_timestamp() — both branches of ($key === 'ts_edit_post_push_cb') ? $current_time : $current_time returned the same value. Timestamp meta keys now correctly receive a Unix timestamp ($timestamp) while date-string meta keys receive $current_time.
  • FIXED: Duplicate mcu_publish_scheduled_chapter hook registration — the hook was registered both in MangaChapterUploader::__construct() (main plugin) and at the bottom of the extensions file, causing the scheduled chapter publisher to fire twice per event. The redundant registration in extensions has been removed.
  • FIXED: MCU_ScheduledPublisher::publish_scheduled_chapter() was instantiating new MangaChapterUploader() to call push_series_to_latest_update(). Creating a new instance re-registers all AJAX and WordPress hooks, leading to duplicate callbacks. Now uses the existing global $manga_chapter_uploader instance instead.
  • FIXED: Typo in fetch_from_mangadex() regex pattern — mangadx corrected to mangadex. The previous pattern never matched any real MangaDex image URLs.

includes/class-chunk-uploader.php

  • FIXED: Division by zero risk in handle_chunk_upload() — progress percentage calculation count(...) / $total_chunks would produce a fatal Division by zero error if $total_chunks was 0. Added a guard: returns 0 when $total_chunks is not positive.

manga-chapter-uploader.php

  • FIXED: Unnecessary global $mcu_logger declaration — MCU_Logger is a fully static class and requires no instance. The unused global variable declaration has been removed to avoid confusion.
  • FIXED: Redundant sprintf() wrapping a translation call with no format placeholders in admin_notices(). If a translator's string contained % characters this could trigger a PHP warning. Changed to a direct __() call.

🔧 Technical Improvements

  • UPDATED: Plugin header Tested up to bumped from 6.4 to 6.7
  • CLEANED: Removed dead switch case 'mangadx.org' from MCU_AdvancedFetcher::fetch_from_url() (was unreachable after the typo fix)

⬆️ Upgrade Notes

  • Automatic: No manual intervention required
  • Database: No schema changes
  • Settings: All existing settings are fully preserved
  • Compatibility: Full backward compatibility maintained

🛠️ Critical Fixes

  • FIXED: Image mixing between chapters in batch uploads - eliminated cross-chapter image contamination
  • FIXED: wp_handle_sideload() file deletion causing image confusion between different chapters
  • IMPLEMENTED: Each chapter now uses isolated temporary directory (temp_chapter_{number}_{uniqid})
  • ENHANCED: File isolation system with unique image copies per chapter to prevent WordPress file conflicts
  • ADDED: Advanced logging for image processing debugging and troubleshooting

🚀 Technical Improvements

  • NEW: Isolated file processing system - each chapter gets its own temporary workspace
  • ENHANCED: Unique filename generation: {folder}_ch{number}_img{index}_{original} format
  • IMPROVED: Safe file copying before WordPress media processing to prevent file deletion conflicts
  • OPTIMIZED: Temporary directory cleanup with per-chapter isolation and automatic cleanup
  • STRENGTHENED: File existence and readability checks before processing

🔍 What This Fixes

  • Chapter Image Separation: Chapter 1 images no longer appear in Chapter 2 or vice versa
  • Proper Image Segregation: Complete isolation of images in multi-chapter ZIP uploads
  • File Path Conflicts: No more file path conflicts between different chapters
  • WordPress Integration: Eliminated wp_handle_sideload() file deletion issues that caused image mixing
  • Batch Upload Reliability: Multi-chapter uploads now maintain perfect image integrity per chapter

V1.6.0

Choose a tag to compare

@souldret souldret released this 25 Apr 17:24
0ed7763

V1.6.0- Performance & Stability Update 🚀

This major update drastically improves bulk upload performance, resolves critical timeout issues with large ZIP files, and fixes chronologic sorting issues for bulk chapters.

🚀 Performance Optimizations

  • Fast Sideload Mode: The chapter upload process was completely rewritten to bypass the WordPress Media Library. Images are now directly saved to wp-content/uploads/manga_chapters/.
  • Zero Database Overhead: Removed the redundant database INSERT queries for each individual image, resulting in near-instantaneous chapter processing.

📦 Stability & Fixes

  • Chunk Uploading System: Integrated a chunked upload system (2MB chunks) to safely process massive ZIP files (up to 5GB) without hitting server upload_max_filesize or connection timeout limits.
  • Extraction Timeout Fix: Disabled PHP execution time limits (@set_time_limit(0)) and increased memory limits during the ZIP extraction phase to prevent silent failures on massive archives. Added robust fallback logic to handle chunk-assembled files.
  • Timestamp Overflow Fix: Corrected a critical timestamp miscalculation that occurred with high chapter numbers (e.g., 300+). The system now uses a batch-relative index rather than an absolute chapter number, accurately sorting up to 1440 chapters sequentially in a single batch without jumping into future dates.

🧹 Improvements

  • Garbage Collection Hooks: Added before_delete_post and wp_trash_post hooks. Deleting a chapter from the WordPress admin panel now automatically cleans up its associated isolated image folder from the server, preventing orphaned files.
  • UI Updates: Added a prominent "Support the Developer" (Ko-fi) button to the plugin admin header.

V1.4.0

Choose a tag to compare

@souldret souldret released this 28 Dec 15:45
0b86c34

🔄 Güncelleme Notları

v1.4.0 - Büyük Kararlılık ve Performans Güncellemesi

🛠️ Kritik Düzeltmeler

  • DÜZELTİLDİ: Sıralı bölüm düzeni - artık karışık sıralama yok (161,163,162 → 160,161,162,163...)
  • DÜZELTİLDİ: Zamanlanmış post sorunları - tüm bölümler artık anında yayınlanıyor
  • DÜZELTİLDİ: PHP dosya işlem hataları (unlink, filesize uyarıları ortadan kaldırıldı)
  • DÜZELTİLDİ: WordPress cron hataları, özel schedule tanımları ile çözüldü
  • DÜZELTİLDİ: Ana sayfa itme sistemi güvenilirlik için tamamen yeniden yapıldı

🚀 Performans İyileştirmeleri

  • YENİ: Garantili bölüm sırası için sıralı işleme sistemi
  • YENİ: Detaylı durum güncellemeleri ile gerçek zamanlı ilerleme takibi
  • YENİ: Gelişmiş hata yönetimi ve kurtarma mekanizmaları
  • YENİ: Daha iyi performans için optimize edilmiş dosya işlemleri
  • YENİ: Debug için gelişmiş loglama sistemi

🎛️ Yeni Özellikler

  • YENİ: Yapılandırılabilir ZIP dosya boyutu limitleri (100MB - 5GB)
  • YENİ: Daha fazla özelleştirme seçeneği ile geliştirilmiş ayarlar sayfası
  • YENİ: Kapsamlı debug bilgisi görüntüleme
  • YENİ: Daha iyi tema uyumluluğu için çoklu meta alanı desteği
  • YENİ: Zorla ana sayfa görünüm sistemi

🔧 Teknik İyileştirmeler

  • GELİŞTİRİLDİ: Güvenli recursive dizin işlemleri
  • GELİŞTİRİLDİİ: Gelişmiş cache yönetimi
  • GELİŞTİRİLDİ: Daha iyi WordPress hook entegrasyonu
  • GELİŞTİRİLDİ: Kapsamlı transient temizleme
  • GELİŞTİRİLDİ: Geliştirilmiş tema uyumluluğu

V1.3.3

Choose a tag to compare

@souldret souldret released this 08 Sep 14:50
398e3a0

Manga Chapter Uploader v1.3.3 - Release Notes

🚀 Major Features

Configurable ZIP File Size Limits

  • NEW: ZIP file size limits are now configurable from Settings page
  • Available options: 100MB, 200MB, 500MB, 1GB, 2GB, 5GB
  • Default: 500MB (increased from previous 100MB hardcoded limit)
  • Smart validation: Real-time file size checking with user feedback

Enhanced User Experience

  • Real-time file size display when selecting ZIP files
  • Visual feedback with color-coded size warnings
  • Dynamic limit updates based on admin settings
  • Improved error messages for oversized files

⚙️ Technical Improvements

Performance Optimizations

  • Extended timeout for large ZIP files (15 minutes for multiple uploads)
  • Progressive upload tracking with enhanced progress indicators
  • Memory-efficient processing for large file operations
  • Optimized ZIP extraction with better error handling

Admin Interface Enhancements

  • Settings page expansion with new ZIP size configuration
  • Visual requirements display on upload forms
  • Server compatibility warnings for large file uploads
  • Better form validation with instant feedback

Code Quality & Security

  • Enhanced input validation for all file upload endpoints
  • Improved error handling with detailed debugging information
  • Backward compatibility maintained for existing installations
  • Secure file processing with additional safety checks

🔧 Configuration Options

New Settings

  • Maximum ZIP File Size: Configurable from 100MB to 5GB
  • Server Warnings: Automatic detection of potential server limitations
  • Smart Defaults: Intelligent selection based on server capabilities

Enhanced Validation

  • Client-side validation prevents upload attempts of oversized files
  • Server-side verification as final safety check
  • User-friendly error messages with specific size information
  • Guidance for server configuration when limits are reached

📱 User Interface Updates

Multiple Chapter Upload

  • Visual ZIP requirements displayed prominently
  • File size information shown immediately upon selection
  • Status indicators for file validation
  • Clear error messaging for various failure scenarios

Form Improvements

  • Consistent styling across all upload methods
  • Better responsive design for various screen sizes
  • Enhanced accessibility with improved labels and descriptions
  • Streamlined workflow with logical form progression

🐛 Bug Fixes

File Processing

  • Fixed: ZIP extraction issues with certain folder structures
  • Fixed: Memory leaks during large file processing
  • Fixed: Timeout issues with slow server responses
  • Fixed: Character encoding problems in folder names

User Interface

  • Fixed: Form reset issues after successful uploads
  • Fixed: Progress bar inconsistencies
  • Fixed: Category auto-selection edge cases
  • Fixed: File input clearing problems

📋 Migration Notes

For Existing Users

  • Automatic migration: Existing installations will use 500MB default limit
  • No data loss: All existing functionality preserved
  • Settings upgrade: New options available immediately after update
  • Backward compatibility: Older ZIP processing methods still supported

For Server Administrators

  • PHP Configuration: May need adjustment for larger file uploads
  • Recommended settings for optimal performance:
    • upload_max_filesize: Set to match or exceed selected ZIP limit
    • post_max_size: Should be larger than upload_max_filesize
    • max_execution_time: 900 seconds or higher for large files
    • memory_limit: 512M or higher recommended

🔄 Compatibility

WordPress Compatibility

  • WordPress: 5.0+ (unchanged)
  • PHP: 7.4+ (unchanged)
  • Required extensions: ZipArchive (for multiple uploads)
  • Theme compatibility: MangaReader themes (unchanged)

Browser Support

  • Modern browsers: Full feature support
  • File API: Required for drag-and-drop functionality
  • JavaScript: Enhanced validation and user feedback

📚 Documentation Updates

New Documentation

  • ZIP size configuration guide
  • Server optimization recommendations
  • Troubleshooting large file uploads
  • Performance tuning guide

Updated Guides

  • Installation instructions with server requirements
  • Configuration examples for various hosting environments
  • Best practices for large manga collections
  • FAQ updates covering new features

🛠️ Developer Notes

API Changes

  • New option: mcu_max_zip_size for storing ZIP size limits
  • Enhanced validation: Additional checks in upload handlers
  • Extended timeouts: Configurable timeout values
  • Improved logging: Better error tracking and debugging

Extension Points

  • Filter hooks: For customizing ZIP size limits programmatically
  • Action hooks: For monitoring large file uploads
  • Validation filters: For custom file size logic
  • Progress callbacks: For custom upload progress handling

🚨 Important Notes

Server Requirements

Large ZIP files require adequate server configuration. Ensure your hosting environment can handle:

  • File uploads up to your selected limit
  • Sufficient PHP memory allocation
  • Extended execution time limits
  • Adequate disk space for temporary file extraction

Performance Considerations

  • Large ZIP files may take significant time to process
  • Users should be informed about expected processing times
  • Server load may increase during large file operations
  • Consider scheduling large uploads during off-peak hours

V1.3.2

Choose a tag to compare

@souldret souldret released this 07 Sep 15:20
398e3a0

v1.3.2

  • ✅ Fixed chapter prefix selection in multiple upload form
  • ✅ Added auto-category selection for all upload methods
  • ✅ Improved error handling and debugging
  • ✅ Enhanced homepage update system
  • ✅ Better form validation and user feedback