WordPress/wp-includes
Sergey Biryukov 1adcc5bb83 Security, Site Health: Do not store HTTPS request error messages in an option.
This changes the logic in `update_https_detection_errors()` to never store error messages from the actual request since they could use a different encoding, which would make storing them in an option potentially fail, leading WordPress to then falsely assume that HTTPS is supported.

While this doesn't actually fix the encoding issue, it is not crucial to do so anyway, since these messages are not used anywhere. A simple differentiation between whether the overall HTTPS request or only the SSL verification failed should be sufficient for the purpose of this function.

Props flixos90, tmatsuur, lukecarbis.
Reviewed by flixos90, SergeyBiryukov.
Merges [50471] to the 5.7 branch.
Fixes #52484.
Built from https://develop.svn.wordpress.org/branches/5.7@50472


git-svn-id: http://core.svn.wordpress.org/branches/5.7@50083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-02 15:16:02 +00:00
..
assets Editor: Update @wordpress npm packages 2021-03-02 00:46:20 +00:00
block-patterns Editor: Don't unnecessarily split a translatable string in block templates. 2020-12-01 17:03:04 +00:00
block-supports Docs: Fix some docblock issues introduced in 5.6. 2020-12-10 23:27:06 +00:00
blocks Editor: Update @wordpress npm packages 2021-03-02 00:46:20 +00:00
certificates HTTP: Update the Root Certificate bundle. 2020-08-01 14:09:06 +00:00
css Editor: Update @wordpress npm packages 2021-03-02 00:46:20 +00:00
customize Administration: Remove italic text to improve readability. 2021-01-27 21:03:57 +00:00
fonts
ID3 Code Modernization: Only call libxml_disable_entity_loader() in PHP < 8. 2020-11-17 01:00:08 +00:00
images
IXR XML-RPC: Emit an appropriate HTTP status code when an error is returned in response to an XML-RPC request. 2020-12-21 20:23:02 +00:00
js Editor: Update @wordpress npm packages 2021-03-02 00:46:20 +00:00
PHPMailer External Libraries: Upgrade PHPMailer to version 6.3.0. 2021-02-21 09:34:05 +00:00
pomo Docs: Various docblock improvements. 2020-12-10 23:59:03 +00:00
random_compat
Requests External Libraries: Disable deserialization in Requests_Utility_FilteredIterator 2020-10-29 18:00:08 +00:00
rest-api REST API: Allow for the posts endpoint include/exclude terms query to include_children. 2021-02-02 19:25:05 +00:00
SimplePie
sitemaps
sodium_compat Upgrade/Install: Update sodium_compat to v1.14.0. 2020-12-03 17:41:07 +00:00
Text
theme-compat Bundled Themes: Use HTTPS for XHTML Friends Network URL. 2020-07-03 23:42:01 +00:00
widgets Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
admin-bar.php Toolbar: Update Documentation and Support links. 2021-01-25 12:53:58 +00:00
atomlib.php
author-template.php Docs: Document parameters that accept an array of integers using typed array notation. 2020-11-19 18:24:09 +00:00
block-patterns.php Block Editor: Update the Core Block Patterns. 2020-07-27 15:14:04 +00:00
blocks.php Docs: Improve documentation for WP_Block_Type properties. 2021-02-23 19:18:02 +00:00
bookmark-template.php Docs: Clarify that the $class argument of wp_list_bookmarks() can accept an array. 2020-11-24 12:29:07 +00:00
bookmark.php Docs: Miscellaneous DocBlock corrections. 2020-07-23 21:55:04 +00:00
cache-compat.php
cache.php Docs: Upgrade more parameters in docblocks to used typed array notation. 2020-11-24 21:27:05 +00:00
canonical.php Canonical: Prevent ID enumeration of private post slugs. 2021-02-02 00:40:01 +00:00
capabilities.php Docs: Add a @since note to map_meta_cap() for the update_https capability. 2021-02-02 12:13:07 +00:00
category-template.php Docs: Correct default value for the number argument of wp_tag_cloud(). 2021-01-24 14:07:57 +00:00
category.php
class-feed.php
class-http.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-IXR.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:33:11 +00:00
class-json.php Coding Standards: Pass an empty string instead of null as the $replacement parameter to _deprecated_file(). 2020-11-12 11:17:07 +00:00
class-oembed.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:33:11 +00:00
class-phpass.php Docs: Update URLs in some @link tags and switch them to HTTPS. 2019-11-01 14:57:02 +00:00
class-phpmailer.php
class-pop3.php General: More PHP compatibility adjustments. 2020-05-01 20:12:06 +00:00
class-requests.php
class-simplepie.php External Libraries: Update the SimplePie library to version 1.5.6. 2020-10-16 17:20:07 +00:00
class-smtp.php Mail: Make sure the SMTP class is only required once if a plugin requires wp-includes/class-smtp.php directly. 2021-01-26 13:45:57 +00:00
class-snoopy.php
class-walker-category-dropdown.php Docs: Fix and upgrade various object docblock notations. 2020-10-17 16:05:09 +00:00
class-walker-category.php
class-walker-comment.php Comments: Revert the introduction of the opt-in comment approval notification feature. 2021-02-17 13:08:05 +00:00
class-walker-nav-menu.php General: Remove noreferrer from wp_targeted_link_rel() and other uses. 2020-10-19 23:39:04 +00:00
class-walker-page-dropdown.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
class-walker-page.php
class-wp-admin-bar.php Docs: Improve description for WP_Admin_Bar::add_group(). 2020-08-19 02:46:04 +00:00
class-wp-ajax-response.php Docs: Replace "html" and "xhtml" instances in DocBlocks and comments with "HTML" and "XHTML". 2020-06-28 14:02:06 +00:00
class-wp-application-passwords.php Docs: Update documentation for WP_Application_Passwords::application_name_exists_for_user() per the documentation standards. 2021-01-28 13:10:57 +00:00
class-wp-block-list.php
class-wp-block-parser.php Editor: Update @wordpress npm packages 2021-02-02 05:17:13 +00:00
class-wp-block-pattern-categories-registry.php I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders. 2021-02-07 12:44:04 +00:00
class-wp-block-patterns-registry.php I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders. 2021-02-07 12:44:04 +00:00
class-wp-block-styles-registry.php
class-wp-block-supports.php Editor: Update @wordpress npm packages 2021-01-28 02:04:13 +00:00
class-wp-block-type-registry.php Docs: Improve documentation for WP_Block_Type properties. 2021-02-23 19:18:02 +00:00
class-wp-block-type.php Docs: Improve documentation for WP_Block_Type properties. 2021-02-23 19:18:02 +00:00
class-wp-block.php Editor: Introduce a dynamic filter for the content of a single block: 2021-02-01 18:06:03 +00:00
class-wp-comment-query.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-comment.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-wp-customize-control.php Docs: Miscellaneous docblock fixes. 2020-10-17 14:54:05 +00:00
class-wp-customize-manager.php Robots: Introduce Robots API. 2021-01-21 01:37:00 +00:00
class-wp-customize-nav-menus.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-customize-panel.php
class-wp-customize-section.php
class-wp-customize-setting.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-customize-widgets.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-date-query.php Docs: Document parameters that accept an array of integers using typed array notation. 2020-11-19 18:24:09 +00:00
class-wp-dependency.php
class-wp-editor.php I18N: Merge duplicate "Column" strings, remove unnecessary context. 2020-11-09 11:17:07 +00:00
class-wp-embed.php Docs: First pass at some inline docs fixes mostly made by PHPCBF. 2020-07-23 20:01:04 +00:00
class-wp-error.php
class-wp-fatal-error-handler.php Site Health: Link to the support article on troubleshooting in "There has been a critical error" message. 2021-02-09 16:59:04 +00:00
class-wp-feed-cache-transient.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-feed-cache.php Feeds: Register transient feed cache handler using the recommended method for SimplePie 1.3 or later. 2020-11-12 14:36:10 +00:00
class-wp-hook.php Docs: In various @return tags, list the expected type first, instead of false or WP_Error. 2021-01-04 17:18:04 +00:00
class-wp-http-cookie.php
class-wp-http-curl.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-http-encoding.php Docs: In various @return tags, list the expected type first, instead of false. 2021-01-15 20:08:07 +00:00
class-wp-http-ixr-client.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-wp-http-proxy.php
class-wp-http-requests-hooks.php Docs: Add missing @since tags. 2020-11-19 17:54:05 +00:00
class-wp-http-requests-response.php
class-wp-http-response.php Coding Standards: Fix/ignore the WordPress.NamingConventions.ValidFunctionName violations. 2019-07-01 08:01:57 +00:00
class-wp-http-streams.php Docs: Various docblock corrections and improvements. 2020-11-14 16:35:06 +00:00
class-wp-image-editor-gd.php Media: Avoid suppressing errors when using getimagesize(). 2021-02-02 16:53:04 +00:00
class-wp-image-editor-imagick.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-wp-image-editor.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-wp-list-util.php Coding Standards: Use strict comparison in WP_List_Util::filter(). 2020-07-10 12:46:09 +00:00
class-wp-locale-switcher.php I18N: Revert [49236] for now to investigate alternative implementations. 2020-11-12 14:43:09 +00:00
class-wp-locale.php Docs: Update the URL for PHP date formats table in translator comments. 2020-09-18 10:37:08 +00:00
class-wp-matchesmapregex.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
class-wp-meta-query.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-wp-metadata-lazyloader.php Docs: Various docblock corrections particularly relating to boolean types. 2021-01-03 21:57:09 +00:00
class-wp-network-query.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-network.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-wp-object-cache.php Docs: Various docblock corrections relating to parameter types. 2020-11-24 21:22:04 +00:00
class-wp-oembed-controller.php Docs: Corrections and improvements to inline docs relating to the REST API. 2020-11-16 11:04:12 +00:00
class-wp-oembed.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
class-wp-paused-extensions-storage.php Docs: Remove an empty line between @param and @return tags, per the documentation standards. 2020-06-20 11:18:09 +00:00
class-wp-post-type.php Docs: Various docblock improvements. 2020-12-10 23:59:03 +00:00
class-wp-post.php Docs: Docblock corrections relating to WP_Post objects. 2020-11-09 15:15:08 +00:00
class-wp-query.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-recovery-mode-cookie-service.php
class-wp-recovery-mode-email-service.php Docs: In various @return tags, list the expected type first, instead of false or WP_Error. 2021-01-04 17:18:04 +00:00
class-wp-recovery-mode-key-service.php Docs: Remove unnecessary variables names from @return tags. 2020-06-19 22:55:12 +00:00
class-wp-recovery-mode-link-service.php Docs: Document the usage of $pagenow global in a few functions. 2021-02-22 19:18:12 +00:00
class-wp-recovery-mode.php
class-wp-rewrite.php Docs: Clarify and standardise on terminology used for rewrite rule endpoint masks. 2020-11-19 16:15:08 +00:00
class-wp-role.php
class-wp-roles.php
class-wp-session-tokens.php
class-wp-simplepie-file.php Feed: Replace join() with implode() for safety. 2020-12-16 14:05:07 +00:00
class-wp-simplepie-sanitize-kses.php
class-wp-site-query.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-site.php Docs: Various docblock corrections and improvements. 2021-02-20 17:10:11 +00:00
class-wp-tax-query.php
class-wp-taxonomy.php Taxonomy: Reorder some WP_Taxonomy properties for consistency. 2021-02-01 11:55:00 +00:00
class-wp-term-query.php Docs: Various docblock corrections and improvements. 2021-02-20 17:10:11 +00:00
class-wp-term.php Docs: Various docblock corrections. 2020-12-10 23:53:07 +00:00
class-wp-text-diff-renderer-inline.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-text-diff-renderer-table.php Revisions: Generate correct number of columns in wp_text_diff. 2021-01-27 21:53:58 +00:00
class-wp-theme.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-user-meta-session-tokens.php Docs: Add @see WP_Session_Tokens to the WP_User_Meta_Session_Tokens docblock. 2019-01-09 05:04:50 +00:00
class-wp-user-query.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-user-request.php
class-wp-user.php Docs: Various docblock improvements. 2020-12-10 23:59:03 +00:00
class-wp-walker.php Docs: Fix typo in a comment in Walker::display_element(). 2020-11-05 18:46:10 +00:00
class-wp-widget-factory.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
class-wp-widget.php Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names. 2021-01-08 14:30:14 +00:00
class-wp-xmlrpc-server.php XML-RPC: Pass the method arguments and the XML-RPC server instance to the xmlrpc_call action. 2021-02-16 17:03:05 +00:00
class-wp.php Comments: Extend the duration of the window within which unapproved comments are visible by their author. 2021-02-09 16:57:04 +00:00
class.wp-dependencies.php Script Loader: Add the $group parameter to WP_Dependencies::do_item(). 2020-05-06 16:27:12 +00:00
class.wp-scripts.php Script Loader: Prevent wp_localize_script() warnings. 2021-02-22 23:23:07 +00:00
class.wp-styles.php Script Loader: Add the $group parameter to WP_Dependencies::do_item(). 2020-05-06 16:27:12 +00:00
comment-template.php Docs: Corrections and improvements to types used in various docblocks. 2021-01-05 17:16:11 +00:00
comment.php Comments: Revert the introduction of the opt-in comment approval notification feature. 2021-02-17 13:08:05 +00:00
compat.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
cron.php Cron API: Add a missing $wp_error parameter to the pre_reschedule_event filter. 2021-02-20 12:11:03 +00:00
date.php
default-constants.php
default-filters.php Comments: Revert the introduction of the opt-in comment approval notification feature. 2021-02-17 13:08:05 +00:00
default-widgets.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:33:11 +00:00
deprecated.php Media: Avoid suppressing errors when using getimagesize(). 2021-02-02 16:53:04 +00:00
embed-template.php
embed.php Embeds: Allow posts with a public custom post status to be embedded. 2021-02-22 13:23:04 +00:00
error-protection.php Docs: Add more information about how to use filters that run before WordPress initialises. 2020-11-03 17:36:09 +00:00
feed-atom-comments.php
feed-atom.php
feed-rdf.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
feed-rss2-comments.php
feed-rss2.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
feed-rss.php
feed.php Feeds: Register transient feed cache handler using the recommended method for SimplePie 1.3 or later. 2020-11-12 14:36:10 +00:00
formatting.php Docs: Correct description for wp_slash() and wp_unslash(). 2021-01-17 16:38:06 +00:00
functions.php Security: move Content-Security-Policy script loaders. 2021-02-23 02:00:06 +00:00
functions.wp-scripts.php Script Loader: Explicitly declare the $pagenow global in wp_deregister_script(). 2021-02-20 09:56:04 +00:00
functions.wp-styles.php
general-template.php Administration: Standardize colors used in CSS to a single palette. 2021-01-26 18:54:59 +00:00
http.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
https-detection.php Security, Site Health: Do not store HTTPS request error messages in an option. 2021-03-02 15:16:02 +00:00
https-migration.php Security, Site Health: Make migrating a site to HTTPS a one-click interaction. 2021-02-02 00:10:01 +00:00
kses.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
l10n.php Docs: In various @return tags, list the expected type first, instead of false. 2021-01-15 20:08:07 +00:00
link-template.php Script Loader: Explicitly declare the $pagenow global in wp_deregister_script(). 2021-02-20 09:56:04 +00:00
load.php Docs: Document the usage of $pagenow global in a few functions. 2021-02-22 19:18:12 +00:00
locale.php
media-template.php Media: Associate upload errors and field with controls. 2021-02-16 04:05:07 +00:00
media.php Media: Make adjacent_image_link() include alt text when returning an image. 2021-02-09 17:27:05 +00:00
meta.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
ms-blogs.php Docs: Fix and upgrade various object docblock notations. 2020-10-17 16:05:09 +00:00
ms-default-constants.php
ms-default-filters.php
ms-deprecated.php Docs: Document parameters that accept an array of integers using typed array notation. 2020-11-19 18:24:09 +00:00
ms-files.php Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
ms-functions.php Docs: Corrections and improvements to types used in various docblocks. 2021-01-05 17:16:11 +00:00
ms-load.php
ms-network.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
ms-settings.php
ms-site.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
nav-menu-template.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
nav-menu.php Menus: Make use of wp_resolve_post_date() when updating menu items. 2021-01-25 01:23:58 +00:00
option.php Docs: Miscellaneous docblock corrections and improvements. 2021-01-07 14:17:11 +00:00
pluggable-deprecated.php Docs: In various @return tags, list the expected type first, instead of false. 2020-01-11 18:32:05 +00:00
pluggable.php Revisions: Generate correct number of columns in wp_text_diff. 2021-01-27 21:53:58 +00:00
plugin.php Docs: In various @return tags, list the expected type first, instead of false or WP_Error. 2021-01-04 17:18:04 +00:00
post-formats.php Docs: Upgrade more parameters in docblocks to used typed array notation. 2020-11-24 21:27:05 +00:00
post-template.php Posts, Post Types: Rename the new post parent conditional tag functions for clarity. 2021-02-20 17:45:04 +00:00
post-thumbnail-template.php Docs: Clarify the @return value for wp_get_attachment_image_url() and get_the_post_thumbnail_url(). 2021-02-08 14:14:08 +00:00
post.php Media: Explicitly declare the $pagenow global in wp_get_attachment_url(). 2021-02-22 18:55:07 +00:00
query.php Docs: Promote many bool types to true or false where only that value is used. 2021-01-03 22:04:04 +00:00
registration-functions.php Coding Standards: Pass an empty string instead of null as the $replacement parameter to _deprecated_file(). 2020-11-12 11:17:07 +00:00
registration.php Coding Standards: Pass an empty string instead of null as the $replacement parameter to _deprecated_file(). 2020-11-12 11:17:07 +00:00
rest-api.php REST API: Correct error code for the maxItems keyword. 2021-03-02 12:55:03 +00:00
revision.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
rewrite.php Docs: Clarify and standardise on terminology used for rewrite rule endpoint masks. 2020-11-19 16:15:08 +00:00
robots-template.php Robots: Rename wp_embed_no_robots to wp_robots_noindex_embeds(). 2021-02-17 10:51:04 +00:00
rss-functions.php Feeds: Add an early exit when calling RSS functions directly. 2020-11-16 22:52:05 +00:00
rss.php Docs: In various @return tags, list the expected type first, instead of false or WP_Error. 2021-01-04 17:18:04 +00:00
script-loader.php External Libraries: Further fix jQuery deprecations in WordPress core. 2021-02-23 19:45:04 +00:00
session.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:33:11 +00:00
shortcodes.php Docs: In various @return tags, list the expected type first, instead of false. 2021-01-15 20:08:07 +00:00
sitemaps.php Sitemaps: Prevent incorrect redirection of paged sitemap requests. 2020-08-27 01:30:04 +00:00
spl-autoload-compat.php Coding Standards: Pass an empty string instead of null as the $replacement parameter to _deprecated_file(). 2020-11-12 11:17:07 +00:00
taxonomy.php Taxonomy: Optimize wp_delete_term() for large object counts without a default term. 2021-02-19 14:31:08 +00:00
template-loader.php Coding Standards: Fix instances of Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty. 2020-05-26 09:37:10 +00:00
template.php Themes: Allow template loading functions to pass additional arguments to the template via the $args parameter. 2020-07-07 11:01:59 +00:00
theme.php Docs: Various docblock corrections and improvements. 2021-02-20 17:10:11 +00:00
update.php Upgrade/Install: Allow WordPress sites to opt-in to development releases. 2021-01-30 10:34:02 +00:00
user.php Users: Use localized site title for password reset emails. 2021-02-26 11:17:05 +00:00
vars.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
version.php Security, Site Health: Do not store HTTPS request error messages in an option. 2021-03-02 15:16:02 +00:00
widgets.php Docs: Correct the type of $widget_id argument in is_active_widget(). 2021-02-17 11:48:12 +00:00
wlwmanifest.xml The Pinking Shears stir from their slumber, awakened by what may seem, to those 2013-12-11 19:49:11 +00:00
wp-db.php Docs: Miscellaneous docblock corrections and improvements. 2021-01-07 14:17:11 +00:00
wp-diff.php