WordPress.org

Make WordPress Core

Changeset 25081


Ignore:
Timestamp:
08/22/2013 04:02:13 AM (8 years ago)
Author:
dd32
Message:

Sanitize the plugin path in _get_plugin_data_markup_translate() to a WP_PLUGIN_DIR-relative path. The function is designed in mind for receiving relative paths, but may be used with a absolute path.
This change makes the function path-agnostic, and can accept either relative or absolute (converting to relative internally). Fixes #20813

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r24583 r25081  
    114114 */
    115115function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup = true, $translate = true ) {
     116
     117    // Sanitize the plugin filename to a WP_PLUGIN_DIR relative path
     118    $plugin_file = plugin_basename( $plugin_file );
    116119
    117120    // Translate fields
Note: See TracChangeset for help on using the changeset viewer.