Commit Graph

39226 Commits

Author SHA1 Message Date
Jonathan Desrosiers
387d40b94b Tag 5.1.7
git-svn-id: https://develop.svn.wordpress.org/tags/5.1.7@49431 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-29 19:42:40 +00:00
Jonathan Desrosiers
d27428b77a WordPress 5.1.7.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@49413 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-29 19:33:37 +00:00
Jake Spurlock
b22615ae9b General: WordPress updates
* XML-RPC: Improve error messages for unprivileged users.
* External Libraries: Disable deserialization in Requests_Utility_FilteredIterator
* Embeds: Disable embeds on deactivated Multisite sites.
* Coding standards: Modify escaping functions to avoid potential false positives.
* XML-RPC: Return error message if attachment ID is incorrect.
* Upgrade/install: Improve logic check when determining installation status.
* Meta: Sanitize meta key before checking protection status.
* Themes: Ensure that only privileged users can set a background image when a theme is using the deprecated custom background page.

Brings the changes from [49380,49382-49388] to the 5.1 branch.

Props xknown, zieladam, peterwilsoncc, whyisjake, desrosj, dd32.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@49395 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-29 18:48:02 +00:00
Jonathan Desrosiers
775bc55989 Build/Test Tools: Explicitly specify a version number in the .nvmrc file for the 5.1 branch.
This restores the ability to run NodeJS related tasks when using `nvm install` or `nvm use`.

The alias `lts/*` currently resolves to NodeJS 12.x (and will continue to change as newer versions are released). The 10.x version of NodeJS is the highest version supported in the 5.1 branch.

This also removes the explicit version when running `nvm install` during automated testing. The command will now fall back to the version in the `.nvmrc` file.

See #51603.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@49278 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-22 16:16:07 +00:00
Sergey Biryukov
d19abc938a Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.
Merges [48338], [48341] to the 5.1 branch.

See #50573.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@48485 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 21:32:44 +00:00
Sergey Biryukov
64b298c5ee Administration: Pass the result of set-screen-option filter to the new set_screen_option_{$option} filter to ensure backward compatibility.
Rename the `$keep` parameter of both filters to `$screen_option` for clarity, update the documentation to better reflect its purpose.

Follow-up to [47951].

Props Chouby, sswells, SergeyBiryukov.
Merges [48241] to the 5.1 branch.
Fixes #50392.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@48247 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-01 09:45:25 +00:00
Jonathan Desrosiers
396f69c53b WordPress 5.1.6.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47992 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 21:31:35 +00:00
Jake Spurlock
a0a9d2b674 Editor: Ensure latest comments can only be viewed from public posts.
This brings the changes from [47984] to the 5.1 branch.

Props: poena, xknown.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47987 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 19:29:06 +00:00
Jonathan Desrosiers
4ffa316958 General: Backport several commits for release.
- Embeds: Ensure that the title attribute is set correctly on embeds.
- Editor: Prevent HTML decoding on by setting the proper editor context.
- Formatting: Ensure that wp_validate_redirect() sanitizes a wider variety of characters.
- Themes: Ensure a broken theme name is returned properly.
- Administration: Add a new filter to extend set-screen-option. 

Merges [47947-47951] to the 5.1 branch.
Props xknown, sstoqnov, vortfu, SergeyBiryukov, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47963 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 18:18:25 +00:00
Sergey Biryukov
daa8895db0 Comments: Ensure that unmoderated comments won't be search indexed.
After a comment is submitted, only allow a brief window where the comment is live on the site.

Props jonkolbert, ayeshrajans, Asif2BD, peterwilsoncc, imath, audrasjb, jonoaldersonwp, whyisjake, SergeyBiryukov.
Merges [47887] and [47889] to the 5.1 branch.
Fixes #49956.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47918 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-06 10:07:01 +00:00
Sergey Biryukov
3e2ac5fd08 Update the About page for WordPress 5.1.5
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47703 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:37:53 +00:00
Jonathan Desrosiers
2560885e1c WordPress 5.1.5
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47669 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 17:55:18 +00:00
Jake Spurlock
372eb13ad9 Customize: Add additional filters to Customizer to prevent JSON corruption.
User: Invalidate `user_activation_key` on password update.
Query: Ensure that only a single post can be returned on date/time based queries.
Block Editor: Coding standards, properly escape class names.
Cache API: Ensure proper escaping around the stats method in the cache API.
Formatting: Expand `sanitize_file_name` to have better support for utf8 characters.

Brings the changes in [47633], [47634], [47635], [47636], [47637], and [47638] to the 5.1 branch.

Props: aduth, batmoo, ehti, ellatrix, jorgefilipecosta, nickdaugherty, noisysocks, pento, peterwilsoncc, sergeybiryukov, sstoqnov, talldanwp, westi, westonruter, whyisjake, whyisjake, xknown.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47646 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 16:06:55 +00:00
Sergey Biryukov
a879500a89 Build/Test Tools: Remove unused ::assertPostHasTerms() method from tests/term.php.
The associated test was removed in [30241].

Merges [47341] to 3.7+ branches.
See #49485.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47489 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-22 14:29:03 +00:00
Sergey Biryukov
7dabc9e4ad Build/Test Tools: Display PHPUnit information for PHP tests only (for 5.1 branch).
This avoids a build error on `travis:format` job, caused by Travis running PHPUnit 9.x by default, which requires PHP 7.3+.

Merges [47336] to the 5.1 branch.
See #49485.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47337 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-21 10:46:53 +00:00
Sergey Biryukov
00a2dbe3be Build/Test Tools: Trim the test matrix on Travis in order to speed up the 5.1 branch build.
This removes the PHP 7.2, 7.1, 5.5, 5.4, and 5.3 jobs.

This also removes the PHP 5.6 job which runs without an object cache in place as the likelihood of a change being backported that only breaks 5.6 environments without an object cache is small.

Merges [44992] and [45005] to the 5.1 branch.
See #42387, #40407.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47322 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-19 13:31:53 +00:00
Sergey Biryukov
80fd7c9970 Tests: Correct assertions in test_site_dates_are_gmt().
`assertSame()` doesn't have the `$delta` parameter, only `assertEquals()` does.

Follow-up to [47313].

Merges [47318] to the 5.1 branch.
See #40364.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47321 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-19 05:13:08 +00:00
Sergey Biryukov
c3011a9ba5 Tests: Use delta comparison in test_site_dates_are_gmt() to avoid race conditions.
Merges [47313] to the 5.1 branch.
See #40364.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47316 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-19 02:57:05 +00:00
Sergey Biryukov
b6a2c29473 WordPress 5.1.4
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46922 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 20:24:13 +00:00
Sergey Biryukov
964aebc211 Formatting: Use wp_list_pluck() instead of array_column() in wp_targeted_link_rel_callback().
`array_column()` requires PHP >= 5.5.

Follow-up to [46894].

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46919 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 19:48:57 +00:00
Jake Spurlock
57715e4b4b Ensure that a user can publish_posts before making a post sticky.
Props: danielbachhuber, whyisjake, peterwilson, xknown.
Prevent  stored XSS through wp_targeted_link_rel().
Props: vortfu, whyisjake, peterwilsoncc, xknown,  SergeyBiryukov, flaviozavan.
Update wp_kses_bad_protocol() to recognize : on uri attributes,
wp_kses_bad_protocol() makes sure to validate that uri attributes don't contain invalid/or not allowed protocols. While this works fine in most cases, there's a risk that by using the colon html5 named entity, one is able to bypass this function.
Brings r46895 to the 5.3 branch.
Props: xknown, nickdaugherty, peterwilsoncc.
Prevent stored XSS in the block editor.
Brings r46896 to the 5.3 branch.
Prevent escaped unicode characters become unescaped in unsafe HTML during JSON decoding.
Props: aduth, epiqueras.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46907 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 18:36:20 +00:00
Jonathan Desrosiers
4de9aac8cd Coding Standards: Fix indentation issues introduced in [46509].
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46541 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 22:04:47 +00:00
Jonathan Desrosiers
b2b1e5fb25 WordPress 5.1.3
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46509 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 20:04:46 +00:00
Jake Spurlock
2e4cbf513b Backports [46474], [46475], [46476], [46477], [46478], [46483], [46485] to the 5.1 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46491 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 18:18:13 +00:00
Jake Spurlock
4ea459d68c Backporting several bug fixes.
- Query: Remove the static query property.
- HTTP API: Protect against hex interpretation.
- Filesystem API: Prevent directory travelersals when creating new folders.
- Administration: Ensure that admin referer nonce is valid.
- REST API: Send a Vary: Origin header on GET requests.

Backports [46474], [46475], [46476], [46477], [46478], [46483], [46485] to the 5.1 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46490 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 18:16:02 +00:00
Jonathan Desrosiers
9c10c15fab Build/Test Tools: Remove PHP nightly build from Travis for 5.1 branch.
See #48225.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46407 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-05 17:06:02 +00:00
Jonathan Desrosiers
59b8d97c1c WordPress 5.1.2.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46045 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 21:25:07 +00:00
Jake Spurlock
42565e613d Update the block library to 2.2.17 to fix an issue with invalid shortcode blocks.
Props aduth, flaviozavan, epiqueras, jorgefilipecosta


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46030 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 21:15:59 +00:00
Sergey Biryukov
6605763c34 Coding Standards: Fix WPCS issue in [45990].
Merges [46019] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46024 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:43:07 +00:00
Andrew Ozz
9c76dcbbe1 jQuery: bring jquery.js back into the WordPress SVN repo and backport the patch from 3.4.0.
Merges [45342] to the 5.1 branch.

Props MikeNGarrett, peterwilsoncc, azaozz.
Fixes #47020.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46014 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:35:42 +00:00
Jonathan Desrosiers
19a8957bd0 Fix for URL sanitization in wp_kses_bad_protocol_once().
Merges [45997] to the 5.1 branch.

Props irsdl, sstoqnov, whyisjake.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46002 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:00:59 +00:00
Sergey Biryukov
678aa83873 Improve handling the existing rel attribute in wp_rel_nofollow_callback().
Merges [45990] to the 5.1 branch.
Props xknown, sstoqnov.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45992 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 17:40:11 +00:00
Sergey Biryukov
fcd92ff35a Improve URL validation in wp_validate_redirect().
Merges [45971] to the 5.1 branch.
Props vortfu, whyisjake, peterwilsoncc.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45973 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:58:39 +00:00
Jake Spurlock
df38632c82 Remove _convert_urlencoded_to_entities() from the get_the_content() callback.
Merges [45937] to the 5.1 branch.

Props vortfu, whyisjake, peterwilsoncc


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45940 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:20:37 +00:00
Sergey Biryukov
bf34d826e8 Escape the output in wp_ajax_upload_attachment().
Merges [45936] to the 5.1 branch.
Props whyisjake, sstoqnov.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45939 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:17:53 +00:00
John Blackbourn
eaa0d5b92b Build/Test tools: Switch npm dependency caching strategy on Travis CI.
This switches to caching npm's local cache instead of `node_modules` in order to prevent issues caused by modules compiled using a different version of node.

Merges [44993] into the 5.1 branch.

See #46632


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44994 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-25 00:53:58 +00:00
Gary Pendergast
3c2d00d038 Admin: Revert [44984].
That was supposed to go into `trunk`, not the 5.1 branch.

See #46573.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44985 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 03:36:10 +00:00
Gary Pendergast
bef9b9138d Admin: Introduce the Site Health screens.
The Site Health tool serves two purposes:
- Provide site owners with information to improve the performance, reliability, and security of their site.
- Collect comprehensive debug information about the site.

By encouraging site owners to maintain their site and adhere to modern best practices, we ultimately improve the software hygeine of both the WordPress ecosystem, and the open internet as a whole.

Props Clorith, hedgefield, melchoyce, xkon, karmatosed, jordesign, earnjam, ianbelanger, wpscholar, desrosj, pedromendonca, peterbooker, jcastaneda, garyj, soean, pento, timothyblynjacobs, zodiac1978, dgroddick, garrett-eclipse, netweb, tobifjellner, pixolin, afercia, joedolson, birgire.
See #46573.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44984 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 03:17:14 +00:00
Felix Arntz
c29015f3b3 Multisite: Do not prime site meta caches unless necessary.
Merges [44926] to the 5.1 branch.

Props spacedmonkey.
Fixes #46357. See #46167.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44928 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-18 16:20:53 +00:00
Felix Arntz
de65eacf12 Multisite: Ensure site meta caches are not primed unless the wp_blogmeta table is available.
Prior to this change, querying sites early in the bootstrap process could potentially cause a fatal error, since at that stage the filter to bail on updating site meta cache if the respective database table has not been installed yet is not hooked in yet. This changeset forces the filter to be added if that is not already the case.

Merges [44925] to the 5.1 branch.

Props spacedmonkey.
Fixes #46167.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44927 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-18 16:19:27 +00:00
Gary Pendergast
688b855fd3 WordPress 5.1.1
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44860 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-13 00:16:04 +00:00
Sergey Biryukov
8df47ff01f PHPCS: Fix errors introduced in [44833].
Merges [44858] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44859 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:56:44 +00:00
Sergey Biryukov
67a2a6feb9 Comments: Improve comment content filtering.
Merges [44842] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44843 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:31:55 +00:00
Sergey Biryukov
7206b554d9 Formatting: Improve rel="nofollow" handling in comments.
Merges [44833] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44834 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:15:37 +00:00
Aaron Jorbin
6d22ce686a General: Add missing @since annotation for wp_get_direct_php_update_url().
Backports [44829] to 5.1 branch. Dev-reviewed by desrosj and SergeyBiryukov.

Missed in [44815].

Props birgire.
See #46074.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44831 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 17:12:22 +00:00
Gary Pendergast
68fa2f44cf WordPress 5.1.1 RC1 post release version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44820 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-08 00:29:18 +00:00
Gary Pendergast
3c91f92aba WordPress 5.1.1 RC1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44819 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-08 00:12:51 +00:00
Jonathan Desrosiers
057d0fbff1 Widgets: Remove change event when editing a Custom HTML widget.
The `change` event was previously required to ensure that the Customizer picked detected changes to the widget's content and synced them to the preview. In the current state, though, the `trigger( 'change' )` is no longer required and is causing issues with the widget's “Done” and “Save” buttons.

Merges [44816] to the 5.1 branch.

Fixes #46335.
Props audrasjb, afercia, westonruter.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44817 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-07 22:34:03 +00:00
Jonathan Desrosiers
85076ad9f9 General: Add a way to specify a direct link for a user to update PHP.
A direct URL to where a user can update PHP for their website can now be specified in one of two ways:

- Defining the `WP_DIRECT_UPDATE_PHP_URL` environment variable.
- Returning a URL to the `wp_direct_php_update_url` filter.

When a URL is specified, an additional “Update PHP” button will be displayed at the bottom of the Core dashboard widget informing administrators that their site is running an outdated version of PHP (see [42832]).

Merges [44814] to the 5.1 branch.

Fixes #46074.
Props afragen, desrosj, lukecarbis.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44815 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-07 21:36:22 +00:00
Jeremy Felt
cd010b40fe Multisite: Ensure wpmu_new_blog hook receives expected data in $meta.
Restores `public`, `archived`, `mature`, `spam`, `deleted`, `lang_id`, and `WPLANG` to the `$meta` data passed to `wpmu_new_blog`. This hook was deprecated in 5.1.0, but code using it still relies on this data.

Props davidbinda, pbiron.
Merges [44805] and [44806] to the 5.1 branch.
Fixes #46351.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44807 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-07 04:36:36 +00:00