Plugin Update API returns duplicate sections
|Reported by:||TobiasBg||Owned by:||ryan|
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).
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.