Making WordPress.org

Changeset 6281


Ignore:
Timestamp:
12/15/2017 03:20:34 AM (7 years ago)
Author:
dd32
Message:

Plugin Directory: Checksums: Move the $skip_bad_files into the non-existant file branch to avoid accidentally clobbering a real file.

Props krisshannon.
Fixes #3335.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/zip/class-builder.php

    r6280 r6281  
    266266            // Combine Checksums from existing files and the new files
    267267            foreach ( $existing_json_checksum_file->files as $file => $checksums ) {
    268                 if ( isset( $skip_bad_files[ $file ] ) ) {
    269                     // See https://meta.trac.wordpress.org/ticket/3335
    270                     // This is a partial filename, which shouldn't have been in the checksums.
    271                     continue;
    272                 }
     268
    273269                if ( ! isset( $json_checksum_file->files[ $file ] ) ) {
     270                    if ( isset( $skip_bad_files[ $file ] ) ) {
     271                        // See https://meta.trac.wordpress.org/ticket/3335
     272                        // This is a partial filename, which shouldn't have been in the checksums.
     273                        continue;
     274                    }
     275
    274276                    // Deleted file, use existing checksums.
    275277                    $json_checksum_file->files[ $file ] = $checksums;
Note: See TracChangeset for help on using the changeset viewer.