WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#10352 closed defect (bug) (duplicate)

Plugin Update API returns duplicate sections

Reported by: TobiasBg Owned by: ryan
Milestone: Priority: normal
Severity: normal Version:
Component: WordPress.org site Keywords:
Focuses: Cc:

Description

A plugin in the WP Extend repository may have a section "Changelog" in its readme.txt since a few weeks (link).

Heiko Rabe, the author of Codestyling Localization just added such a section to the readme.txt of the latest release of his plugin.
Unfortunately he made a small typo: "Change Log" instead of "Changelog". (This means it can actually happen with any plugin, I just noticed it here.)

This leads to a bug in the answer of the Plugin Update API, when viewing the plugin_information screen before installing/updating a plugin (the one that opens inside a thickbox).
URL: http://EXAMPLE.COM/wp-admin/plugin-install.php?tab=plugin-information&plugin=codestyling-localization

Although there actually is no section "Changelog" in the readme.txt (but a "Change Log"), it get's displayed as such. When viewing the section "Change Log" only the short plugin description is shown.
See attached screenshot for what I mean.

I tracked this down to

$api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) ));

in the function install_plugin_information() in /wp-admin/includes/plugin-install.php.

This lets me come to the conclusion, that the information comes from the Plugin Update API at http://api.wordpress.org/plugins/info/1.0/.

I suggest to make the API a little bit more robust for such a typo and of course only make it process one "Changelog" section.

Attachments (1)

screenshot.png (19.6 KB) - added by TobiasBg 5 years ago.
notice "Changelog" and "Change Log" in the red circle

Download all attachments as: .zip

Change History (3)

TobiasBg5 years ago

notice "Changelog" and "Change Log" in the red circle

comment:1 mdawaffe4 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #11217 (though this ticket is a much better description)

comment:2 westi4 years ago

  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.