Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17706

Error Handling in Storage Migration Loop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0.0-b1
    • 4.0.0-a2
    • None
    • None

      • Problem:                                                                                                                                         
          $this->storage_helper->copy_file_to_new_adapter(                                                                                                 
              $storage_name,                                                                                                                               
              $row['physical_filename']                                                                                                                    
          );                                                                                                                                               
        If a single physical file is missing from disk or unreadable, read() throws a storage_exception. There is no try / catch block.                    
        • Impact: An unhandled exception crashes the ACP request. Because state_helper tracks the exact file_index, re-entering the ACP migration resumes  
        on the exact same failed file, permanently wedging the migration process unless the admin manually deletes the migration state or the database     
        record.                                                                                                                                            
        • Fix: Wrap copy_file_to_new_adapter in a try / catch (storage_exception $e), log the error, and record failed files for administrative review.

            rubencm rubencm [X] (Inactive)
            rubencm rubencm [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: