WordPress/wp-includes
John Blackbourn 8c811f8f90 XML-RPC: Correctly handle empty and duplicate comments.
This prevents `wp_die()` being sent in response to an XML-RPC call that attempts to submit a duplicate comment, and correctly returns an error in response to an attempt to submit an empty comment.

Props markoheijnen, websupporter.
Fixes #14452, #38466.
See #36901

Built from https://develop.svn.wordpress.org/trunk@39045


git-svn-id: http://core.svn.wordpress.org/trunk@38987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 01:27:31 +00:00
..
certificates
css Accessibility: Hide the Toolbar sub-menu icons from assistive technologies. 2016-10-27 20:53:30 +00:00
customize Customize: Fix message grammar for custom_css validity error when imbalanced characters possibly due to content CSS property. 2016-10-30 04:04:32 +00:00
fonts
ID3
images
IXR XML-RPC: Fix truncated warning message added in [38883]. 2016-10-29 21:32:33 +00:00
js Customize: Prevent toggling edit shortcuts when doing shift-click or when clicking on a descendent of an interactive element. 2016-10-30 14:59:31 +00:00
pomo I18N: Introduce a locale-switching function. 2016-10-26 15:36:31 +00:00
random_compat Update Random_Compat from 1.1.6 to 1.2.1. 2016-03-08 17:15:27 +00:00
Requests HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues. 2016-10-05 03:24:37 +00:00
rest-api REST API: Allow Content-Type on CORS requests. 2016-10-31 00:34:33 +00:00
SimplePie
Text
theme-compat
widgets Docs: Correct various documentation around object and stdClass types. 2016-08-26 16:49:45 +00:00
admin-bar.php Multisite: Use get_network() and get_current_network_id() for current network data. 2016-10-19 04:47:30 +00:00
atomlib.php General: Check to see that the PHP-XML module is enabled before using XML functions. 2016-10-24 04:45:31 +00:00
author-template.php
bookmark-template.php
bookmark.php
cache.php Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space. 2016-08-31 04:55:54 +00:00
canonical.php Improve category check in redirect_canonical() when permastruct contains category slug. 2016-08-08 18:49:28 +00:00
capabilities.php Customize: Correct the capability mapping and associated tests for the unfiltered_css capability. 2016-10-30 12:47:31 +00:00
category-template.php General: Introduce a wp_list_sort() helper function, v2. 2016-10-25 21:26:32 +00:00
category.php
class-http.php HTTP: Call mbstring_binary_safe_encoding() before making a request with Requests to avoid issues with mbstring.func_overload. 2016-10-25 00:45:29 +00:00
class-IXR.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00
class-json.php
class-oembed.php Embeds: Realign the provider list after [38693]. 2016-10-25 20:16:56 +00:00
class-phpass.php
class-phpmailer.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00
class-pop3.php
class-requests.php HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues. 2016-10-05 03:24:37 +00:00
class-simplepie.php
class-smtp.php
class-snoopy.php
class-walker-category-dropdown.php
class-walker-category.php
class-walker-comment.php
class-walker-nav-menu.php Menus: Fix notices thrown by classes extending Walker_Nav_Menu. 2016-09-08 07:06:30 +00:00
class-walker-page-dropdown.php
class-walker-page.php Menus: Add white space option to wp_nav_menu() and wp_list_pages(). 2016-09-06 09:06:31 +00:00
class-wp-admin-bar.php Accessibility: Hide the Toolbar sub-menu icons from assistive technologies. 2016-10-27 20:53:30 +00:00
class-wp-ajax-response.php
class-wp-comment-query.php Cache API: introduce wp_cache_get_last_changed to improve DRY 2016-10-21 02:54:34 +00:00
class-wp-comment.php Don't improperly cast IDs when fetching post, user, or term objects. 2016-08-26 19:09:27 +00:00
class-wp-customize-control.php Customize: Improve custom background properties UI. 2016-10-26 06:52:29 +00:00
class-wp-customize-manager.php Customize: Prevent auto-draft post/page stubs from being saved with empty slugs or published with non-unique slugs. 2016-10-30 20:21:33 +00:00
class-wp-customize-nav-menus.php Customize: Prevent auto-draft post/page stubs from being saved with empty slugs or published with non-unique slugs. 2016-10-30 20:21:33 +00:00
class-wp-customize-panel.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00
class-wp-customize-section.php Customize: Introduce custom CSS for extending theme styles. 2016-10-19 18:15:31 +00:00
class-wp-customize-setting.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00
class-wp-customize-widgets.php Customize: Implement customized state persistence with changesets. 2016-10-18 20:05:31 +00:00
class-wp-dependency.php Script Loader: move _WP_Dependency into its own file. 2016-08-26 18:06:39 +00:00
class-wp-editor.php TinyMCE: after chats in #core-editor and #desing on Slack, the decision is to not remove Heading 1 for beta1. 2016-10-26 22:01:33 +00:00
class-wp-embed.php Embed: wp-settings.php loads class-wp-embed.php, which currently produces side effects. Move the global instantiation to wp-settings.php. WP_Embed is then in a file by itself. 2016-08-26 09:53:28 +00:00
class-wp-error.php Load: move is_wp_error() to load.php so that WP_Error is in a file by itself. 2016-08-26 09:58:28 +00:00
class-wp-feed-cache-transient.php Feed: move 'WP_Feed_Cache', 'WP_Feed_Cache_Transient', WP_SimplePie_File and WP_SimplePie_Sanitize_KSES into their own files via svn cp. If we move forard with autoloading, class-feed.php is useless. We could even remove it now, and just load these new files in wp-settings.php. That can be decided post-mortem. class-feed.php is an interesting name: there is no Feed or WP_Feed class. 2016-08-25 18:18:39 +00:00
class-wp-feed-cache.php Feed: move 'WP_Feed_Cache', 'WP_Feed_Cache_Transient', WP_SimplePie_File and WP_SimplePie_Sanitize_KSES into their own files via svn cp. If we move forard with autoloading, class-feed.php is useless. We could even remove it now, and just load these new files in wp-settings.php. That can be decided post-mortem. class-feed.php is an interesting name: there is no Feed or WP_Feed class. 2016-08-25 18:18:39 +00:00
class-wp-hook.php Docs: Fix minor formatting for inline docs in WP_Hook following its introduction in [38571]. 2016-09-08 04:17:30 +00:00
class-wp-http-cookie.php HTTP API: Normalize cookies before passing them to Requests. 2016-07-27 15:32:27 +00:00
class-wp-http-curl.php
class-wp-http-encoding.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp-http-ixr-client.php
class-wp-http-proxy.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-http-requests-response.php HTTP: Document that the return value of wp_remote_retrieve_headers() changed from a simple array to an object which implements ArrayAccess. 2016-10-05 03:51:28 +00:00
class-wp-http-response.php
class-wp-http-streams.php
class-wp-image-editor-gd.php
class-wp-image-editor-imagick.php Media: Add support for rendering PDF thumbnails. 2016-10-26 07:28:32 +00:00
class-wp-image-editor.php
class-wp-list-util.php General: Introduce a wp_list_sort() helper function, v2. 2016-10-25 21:26:32 +00:00
class-wp-locale-switcher.php I18N: Introduce a locale-switching function. 2016-10-26 15:36:31 +00:00
class-wp-locale.php General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight. 2016-08-31 05:49:37 +00:00
class-wp-matchesmapregex.php Load: move WP_MatchesMapRegex into its own file. 2016-08-26 18:11:39 +00:00
class-wp-meta-query.php General: Restore usage of $wpdb, instead of $this->db. 2016-10-10 06:38:31 +00:00
class-wp-metadata-lazyloader.php
class-wp-network-query.php Cache API: introduce wp_cache_get_last_changed to improve DRY 2016-10-21 02:54:34 +00:00
class-wp-network.php
class-wp-oembed-controller.php
class-wp-post-type.php Docs: Use a third-person singular verb for register_post_type_args filter added in [34242]. 2016-09-14 21:58:29 +00:00
class-wp-post.php Posts, Post Types: Add support for post type templates. 2016-10-26 08:07:30 +00:00
class-wp-query.php Query: Allow the prefix used for search term exclusion to be filtered. 2016-10-20 18:42:29 +00:00
class-wp-rewrite.php Make sure rewrite rules are not written until wp_loaded has fired 2016-10-07 19:44:28 +00:00
class-wp-role.php
class-wp-roles.php General: Restore usage of $wpdb, instead of $this->db. 2016-10-10 06:38:31 +00:00
class-wp-session-tokens.php
class-wp-simplepie-file.php Feed: move 'WP_Feed_Cache', 'WP_Feed_Cache_Transient', WP_SimplePie_File and WP_SimplePie_Sanitize_KSES into their own files via svn cp. If we move forard with autoloading, class-feed.php is useless. We could even remove it now, and just load these new files in wp-settings.php. That can be decided post-mortem. class-feed.php is an interesting name: there is no Feed or WP_Feed class. 2016-08-25 18:18:39 +00:00
class-wp-simplepie-sanitize-kses.php Feed: move 'WP_Feed_Cache', 'WP_Feed_Cache_Transient', WP_SimplePie_File and WP_SimplePie_Sanitize_KSES into their own files via svn cp. If we move forard with autoloading, class-feed.php is useless. We could even remove it now, and just load these new files in wp-settings.php. That can be decided post-mortem. class-feed.php is an interesting name: there is no Feed or WP_Feed class. 2016-08-25 18:18:39 +00:00
class-wp-site-query.php Cache API: introduce wp_cache_get_last_changed to improve DRY 2016-10-21 02:54:34 +00:00
class-wp-site.php Multisite: Deprecate the blog_details filter. 2016-10-25 23:44:30 +00:00
class-wp-tax-query.php General: Restore usage of $wpdb, instead of $this->db. 2016-10-10 06:38:31 +00:00
class-wp-taxonomy.php Taxonomy: Introduce WP_Taxonomy and use it in register_taxonomy() and unregister_taxonomy(). 2016-10-07 17:12:29 +00:00
class-wp-term-query.php Cache API: introduce wp_cache_get_last_changed to improve DRY 2016-10-21 02:54:34 +00:00
class-wp-term.php Don't improperly cast IDs when fetching post, user, or term objects. 2016-08-26 19:09:27 +00:00
class-wp-text-diff-renderer-inline.php
class-wp-text-diff-renderer-table.php
class-wp-theme.php Posts, Post Types: Add support for post type templates. 2016-10-26 08:07:30 +00:00
class-wp-user-meta-session-tokens.php
class-wp-user-query.php General: Restore usage of $wpdb, instead of $this->db. 2016-10-10 06:38:31 +00:00
class-wp-user.php General: Restore usage of $wpdb, instead of $this->db. 2016-10-10 06:38:31 +00:00
class-wp-walker.php
class-wp-widget-factory.php
class-wp-widget.php
class-wp-xmlrpc-server.php XML-RPC: Correctly handle empty and duplicate comments. 2016-10-31 01:27:31 +00:00
class-wp.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
class.wp-dependencies.php Script Loader: move _WP_Dependency into its own file. 2016-08-26 18:06:39 +00:00
class.wp-scripts.php
class.wp-styles.php
comment-template.php Comments: In comment_form(), bail early if comments for the post are closed. 2016-10-26 14:48:29 +00:00
comment.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
compat.php
cron.php Cron: clarify descriptions for Cron API functions. 2016-08-26 09:22:30 +00:00
date.php General: Restore usage of $wpdb, instead of $this->db. 2016-10-10 06:38:31 +00:00
default-constants.php Themes: Twenty Seventeen is now the default theme. 2016-10-20 09:13:29 +00:00
default-filters.php Customize: Remove premature (and verbose) check of fresh_site option due to database not being ready on multisite. 2016-10-28 03:43:30 +00:00
default-widgets.php
deprecated.php General: Introduce a wp_list_sort() helper function, v2. 2016-10-25 21:26:32 +00:00
embed-template.php
embed.php OEmbed: move _wp_oembed_get_object() to embed.php, where all of the other embed functions live. WP_oEmbed is then in a file by itself. Load class-oembed.php in wp-settings.php and remove extraneous include calls. 2016-08-26 09:49:28 +00:00
feed-atom-comments.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
feed-atom.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
feed-rdf.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
feed-rss2-comments.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
feed-rss2.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
feed-rss.php Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds. 2016-10-25 20:48:29 +00:00
feed.php General: Check to see that the PHP-XML module is enabled before using XML functions. 2016-10-24 04:45:31 +00:00
formatting.php General: Add a sanitize_textarea_field() function. 2016-10-26 05:17:35 +00:00
functions.php Customize: Introduce starter content and site freshness state. 2016-10-28 02:57:35 +00:00
functions.wp-scripts.php Customize: Implement customized state persistence with changesets. 2016-10-18 20:05:31 +00:00
functions.wp-styles.php Script Loader: Correct default value for $src in wp_enqueue_script() and wp_enqueue_style(). 2016-09-04 04:09:28 +00:00
general-template.php Customize: Prevent absent site icon link from outputting an empty string as href in customizer; use /favicon.ico as fallback. 2016-10-25 04:47:29 +00:00
http.php Multisite: Use get_network() and get_current_network_id() for current network data. 2016-10-19 04:47:30 +00:00
kses.php KSES: Deprecate wp_kses_js_entities(). 2016-10-13 22:25:31 +00:00
l10n.php I18N: Don't initialize WP_Locale_Switcher in wp_load_translations_early(). 2016-10-29 11:23:33 +00:00
link-template.php General: Introduce a wp_list_sort() helper function, v2. 2016-10-25 21:26:32 +00:00
load.php I18N: Don't initialize WP_Locale_Switcher in wp_load_translations_early(). 2016-10-29 11:23:33 +00:00
media-template.php Media: Add support for rendering PDF thumbnails. 2016-10-26 07:28:32 +00:00
media.php Media: Add support for rendering PDF thumbnails. 2016-10-26 07:28:32 +00:00
meta.php Meta: Improve ID casting when getting, updating or deleting meta data. 2016-10-01 06:28:30 +00:00
ms-blogs.php Multisite: Replace get_blog_details() in inline documentation. 2016-10-26 03:39:29 +00:00
ms-default-constants.php Multisite: Use get_network() and get_current_network_id() for current network data. 2016-10-19 04:47:30 +00:00
ms-default-filters.php
ms-deprecated.php Multisite: Replace get_blog_details() in inline documentation. 2016-10-26 03:39:29 +00:00
ms-files.php Multsite: Flush output buffer after readfile() in ms-files.php. 2016-09-27 20:05:28 +00:00
ms-functions.php I18N: Introduce a locale-switching function. 2016-10-26 15:36:31 +00:00
ms-load.php Multisite: Replace get_blog_details() in inline documentation. 2016-10-26 03:39:29 +00:00
ms-settings.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00
nav-menu-template.php Menus: Add the menu-item-home class to the static front page item. 2016-10-26 01:58:30 +00:00
nav-menu.php General: Introduce a wp_list_sort() helper function, v2. 2016-10-25 21:26:32 +00:00
option.php REST API: Add the default_comment_status and default_ping_status options to the setting endpoint. 2016-10-26 22:21:01 +00:00
pluggable-deprecated.php
pluggable.php I18N: Introduce a locale-switching function. 2016-10-26 15:36:31 +00:00
plugin.php Bootstrap: Use dirname() when loading class-wp-hook.php from plugin.php. 2016-09-12 01:50:30 +00:00
post-formats.php
post-template.php Posts, Post Types: Add support for post type templates. 2016-10-26 08:07:30 +00:00
post-thumbnail-template.php
post.php Posts, Post Types: Add support for post type templates. 2016-10-26 08:07:30 +00:00
query.php Query: in wp_old_slug_redirect(), use get_query_var() instead of importing and touching the global $wp_query directly. 2016-08-31 06:21:41 +00:00
registration-functions.php
registration.php
rest-api.php REST API: Add PATCH to CORS allowed methods. 2016-10-31 00:19:30 +00:00
revision.php Post Thumbnails: Prevent post thumbnail previews from spilling into other images. 2016-08-29 12:25:29 +00:00
rewrite.php
rss-functions.php
rss.php General: Check to see that the PHP-XML module is enabled before using XML functions. 2016-10-24 04:45:31 +00:00
script-loader.php Themes: Enable video in custom headers. 2016-10-27 21:51:31 +00:00
shortcodes.php Shortcodes: Add new strip_shortcodes_tagnames filter. 2016-10-23 14:25:31 +00:00
taxonomy.php REST API: Introduce the Content API endpoints. 2016-10-20 02:55:32 +00:00
template-loader.php Themes: Remove paged.php from the theme template hierarchy. 2016-10-07 21:03:31 +00:00
template.php Posts, Post Types: Add support for post type templates. 2016-10-26 08:07:30 +00:00
theme.php Customize: Introduce starter content and site freshness state. 2016-10-28 02:57:35 +00:00
update.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00
user.php I18N: Introduce a locale-switching function. 2016-10-26 15:36:31 +00:00
vars.php General: revert [38467], wp_is_IE() should not exist. 2016-08-31 15:22:31 +00:00
version.php XML-RPC: Correctly handle empty and duplicate comments. 2016-10-31 01:27:31 +00:00
widgets.php
wlwmanifest.xml
wp-db.php Database: Fall back to utf8 when utf8mb4 isn't supported. 2016-09-08 23:49:30 +00:00
wp-diff.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00