Making WordPress.org

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3335 closed defect (bug) (fixed)

Plugin Checksum generation failing with filenames containing whitespace

Reported by: krisshannon's profile krisshannon Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords: has-patch
Cc:

Description

Filenames with whitespace are being truncated at the first whitespace.

Attachments (1)

3335.diff (672 bytes) - added by krisshannon 6 years ago.

Download all attachments as: .zip

Change History (11)

@krisshannon
6 years ago

#1 @dd32
6 years ago

Hey @krisshannon,

Do you have an example plugin of where this is occurring?

#2 @krisshannon
6 years ago

  • Keywords has-patch added

https://wordpress.org/plugins/hummingbird-performance/

Specifically version 1.7.0.3 has a file called "externals/shared-ui/font/WPMU DEV Dashboard.json" but the checksum is recorded with a filename of "externals/shared-ui/font/WPMU"

Last edited 6 years ago by krisshannon (previous) (diff)

#3 @schlessera
6 years ago

Link to checksums of this plugin & version: https://downloads.wordpress.org/plugin-checksums/hummingbird-performance/1.7.0.3.json

Indeed, the filename was truncated at the first space.

#4 @dd32
6 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 6280:

Plugin Directory: Checksums: Correctly handle filenames with spaces, previously the filename was being truncated.

Props krisshannon.
Fixes #3335.

#5 @krisshannon
6 years ago

Hey @dd32

What if the plugin includes both a 'Testing' file as well as 'Testing Test'? If there is a new checksum for the 'Testing' file the old one will be lost.

Maybe the if ( isset( $skip_bad_files[ $file ] ) ) block should be moved inside the if ( ! isset( $json_checksum_file->files[ $file ] ) ) block.

Last edited 6 years ago by krisshannon (previous) (diff)

#6 @dd32
6 years ago

Good call @krisshannon - If this runs into any further problems I'm just going to remove the skip function though :)

#7 @dd32
6 years ago

In 6281:

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.

#8 follow-up: @schlessera
6 years ago

@dd32 The checksums in https://downloads.wordpress.org/plugin-checksums/wd-instagram-feed/1.2.9 still contain a truncated filename ( see https://make.wordpress.org/cli/2017/12/09/call-for-action-help-us-test-checksum-verification/#comment-102 ).

Has this simply not been updated yet, or do you think we still have a problem with the generation.

The difference this time is that the file contains URL encoded spaces (%20) instead of actual spaces.

Last edited 6 years ago by schlessera (previous) (diff)

#9 @schlessera
6 years ago

Apparently, this is fixed in the following release's checksums file, so I assume the problem is just that older versions don't get recreated.

#10 in reply to: ↑ 8 @dd32
6 years ago

Replying to schlessera:

@dd32 The checksums in https://downloads.wordpress.org/plugin-checksums/wd-instagram-feed/1.2.9 still contain a truncated filename ( see https://make.wordpress.org/cli/2017/12/09/call-for-action-help-us-test-checksum-verification/#comment-102 ).

You'll need to report any truncated checksums, they won't be fixed retrospectively automatically unless there's a change to the plugin version.
Please post the filename of the truncated files too, as I'm not going to dig through the files to verify if it's fixed or not.
I've kicked off a job to rebuild the ZIPs (and therefor, checksums) of the mentioned plugin.

Note: See TracTickets for help on using tickets.