Making WordPress.org


Ignore:
Timestamp:
08/19/2020 12:17:39 AM (6 years ago)
Author:
dd32
Message:

Theme Directory: API: Be far more strict and defensive with inputs.

Someone out there is sending a lot of requests to the API with junk data causing PHP warnings.

This validates input and rejects the junk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r10084 r10177  
    857857 * @param $method string The Method being called. Valid values: 'query_themes', 'theme_information', 'hot_tags', 'feature_list', and 'get_commercial_shops'
    858858 * @param $args   array  The arguements for the call.
    859  * @param $format string The format to return the data in. Valid values: 'json', 'php', 'raw' (default)
     859 * @param $format string The format to return the data in. Valid values: 'json', 'php', 'api_object', 'raw' (default)
    860860 */
    861861function wporg_themes_query_api( $method, $args = array(), $format = 'raw' ) {
Note: See TracChangeset for help on using the changeset viewer.