Commit Graph

21335 Commits

Author SHA1 Message Date
desrosj 1e5efe9093 Grouped backports to the 4.5 branch.
- Query: Improve sanitization within `WP_Tax_Query`.
- Query: Improve sanitization within `WP_Meta_Query`.
- Upgrade/Install: Avoid using `unserialize()` unnecessarily.
- Formatting: Correctly encode ASCII characters in post slugs.

Merges [52454-52457] to the 4.5 branch.
Props vortfu, dd32, ehtis, zieladam, whyisjake, xknown, peterwilsoncc, desrosj, iandunn.
Built from https://develop.svn.wordpress.org/branches/4.5@52478


git-svn-id: http://core.svn.wordpress.org/branches/4.5@52070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 18:18:41 +00:00
Peter Wilson baf423c157 WordPress 4.5.24.
Built from https://develop.svn.wordpress.org/branches/4.5@50881


git-svn-id: http://core.svn.wordpress.org/branches/4.5@50490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 23:21:20 +00:00
Peter Wilson a6101b9cb3 External libraries: Improve attachment handling in PHPMailer
Props: audrasjb, ayeshrajans, desrosj, peterwilsoncc, xknown.
Partially merges [50799] to the 4.5 branch.


Built from https://develop.svn.wordpress.org/branches/4.5@50859


git-svn-id: http://core.svn.wordpress.org/branches/4.5@50468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 22:33:56 +00:00
desrosj 99dd37cbd4 Build/Test Tools: Backport GitHub Action and build improvements to the 4.5 branch.
This backports several build and test tool improvements to the 4.5 branch. Most notably, this includes:

- The changes required to allow each workflow to be triggered by the `workflow_dispatch` event so that tests can be run on a schedule [50590].
- Splitting single site and multisite tests into parallel jobs [50379].
- Split slow tests into separate, parallel jobs for PHP <= 5.6 [50444].
- Better branch and path scoping for GitHub Action workflows when running on `pull_request` [50432,50479].
- Several `devDependency` updates.

Merges [50379,50387,50416,50432,50435,50436,50444,50446,50473,50474,50476,50479,50485,50486,50487,50545,50579,50590] to the 4.5 branch.
See #50401, #51801, #51802, #52548, #52612, #52624, #52625, #52645, #52653, #52658, #52660, #52667.
Built from https://develop.svn.wordpress.org/branches/4.5@50638


git-svn-id: http://core.svn.wordpress.org/branches/4.5@50250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-02 15:40:23 +00:00
desrosj 968d57a6b3 Build/Test Tools: Support NodeJS 14.x in the 4.5 branch.
This updates the 4.5 branch to support the latest LTS version of NodeJS (currently 14.x), allowing the same version to be used across all WordPress branches that receive security updates as a courtesy.

Because older branches use (really) old versions of NodeJS, the local Docker environment cannot be backported since the needed dependencies will not run on these older versions (see #48301). This also blocks the ability to move automated testing over to GitHub Actions (see #50401).

This also replaces the `npm-shrinkwrap.json` with a `package-lock.json` file. Lock files were not supported in earlier versions of NPM, but can now be used.

In addition to backporting the package updates that happened after branching 4.5, dependencies that were removed in future releases have also been updated to their latest versions.

Props desrosj, dd32, netweb, jorbin.
Merges [37185,37212,37612,38111,38688,39110,39113-39119,39478,42460-42461,42463,42887,43320,43323,43977,44219,44233,44728,45321,45765,46404,46408-46409,47404,47867-47869,47872-47873,48705,49636,49933,49937,49939,50017,50126,50176,50185,50192] to the 4.5 branch.
See #52341.
Built from https://develop.svn.wordpress.org/branches/4.5@50208


git-svn-id: http://core.svn.wordpress.org/branches/4.5@49880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 04:20:44 +00:00
desrosj 511300cfed WordPress 4.5.23.
Built from https://develop.svn.wordpress.org/branches/4.5@49419


git-svn-id: http://core.svn.wordpress.org/branches/4.5@49178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-29 19:41:21 +00:00
whyisjake a14f1a83a9 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 4.5 branch.

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

Built from https://develop.svn.wordpress.org/branches/4.5@49401


git-svn-id: http://core.svn.wordpress.org/branches/4.5@49160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-29 19:02:24 +00:00
desrosj fb5af944fe WordPress 4.5.22.
Built from https://develop.svn.wordpress.org/branches/4.5@47998


git-svn-id: http://core.svn.wordpress.org/branches/4.5@47766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 21:38:34 +00:00
whyisjake acdabf9d25 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 4.5 branch.
Props xknown, sstoqnov, vortfu, SergeyBiryukov, whyisjake.

Built from https://develop.svn.wordpress.org/branches/4.5@47973


git-svn-id: http://core.svn.wordpress.org/branches/4.5@47743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 18:54:52 +00:00
desrosj fd5fab4e36 WordPress 4.5.21
Built from https://develop.svn.wordpress.org/branches/4.5@47675


git-svn-id: http://core.svn.wordpress.org/branches/4.5@47452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 18:02:27 +00:00
whyisjake ef104bfdae Cache API: Ensure proper escaping around the stats method in the cache API.
Brings the changes in [47637] to the 4.5 branch.

Props: nickdaugherty, batmoo, whyisjake, westi.

Built from https://develop.svn.wordpress.org/branches/4.5@47654


git-svn-id: http://core.svn.wordpress.org/branches/4.5@47431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 16:43:22 +00:00
whyisjake fa2982ec5c User: Invalidate `user_activation_key` on password update.
Query: Ensure that only a single post can be returned on date/time based queries.
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 [47634], [47635], [47637], and [47638] to the 4.7 branch.

Props: batmoo, ehti, nickdaugherty, peterwilsoncc, sergeybiryukov, sstoqnov, westi, whyisjake, whyisjake, xknown.

Built from https://develop.svn.wordpress.org/branches/4.5@47652


git-svn-id: http://core.svn.wordpress.org/branches/4.5@47427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 16:26:23 +00:00
Sergey Biryukov 6f2686ba36 WordPress 4.5.20
Built from https://develop.svn.wordpress.org/branches/4.5@46928


git-svn-id: http://core.svn.wordpress.org/branches/4.5@46728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-12-12 20:30:20 +00:00
Sergey Biryukov 22450a0f8b Update `wp_kses_bad_protocol()` to recognize `&colon;` 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 4.5 branch.

Props: xknown, nickdaugherty, peterwilsoncc.
Built from https://develop.svn.wordpress.org/branches/4.5@46913


git-svn-id: http://core.svn.wordpress.org/branches/4.5@46713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-12-12 18:45:22 +00:00
desrosj 102f8be630 WordPress 4.5.19.
Built from https://develop.svn.wordpress.org/branches/4.5@46515


git-svn-id: http://core.svn.wordpress.org/branches/4.5@46312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-14 20:11:21 +00:00
whyisjake c50dcb41b6 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.
- Customizer: Properly sanitize background images.

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

Built from https://develop.svn.wordpress.org/branches/4.5@46497


git-svn-id: http://core.svn.wordpress.org/branches/4.5@46294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-14 19:07:24 +00:00
desrosj 5c04f19922 WordPress 4.5.18.
Built from https://develop.svn.wordpress.org/branches/4.5@46039


git-svn-id: http://core.svn.wordpress.org/branches/4.5@45851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 22:04:22 +00:00
Andrew Ozz 89edee341f jQuery: Backport the patch from jQuery 3.4.0.
Merges [45342] to the 4.5 branch.

Props MikeNGarrett, peterwilsoncc, azaozz.
Fixes #47020.
Built from https://develop.svn.wordpress.org/branches/4.5@46027


git-svn-id: http://core.svn.wordpress.org/branches/4.5@45837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:48:52 +00:00
desrosj b44c70212c Fix for URL sanitization in `wp_kses_bad_protocol_once()`.
Merges [45997] to the 4.5 branch.

Props irsdl, sstoqnov, whyisjake.
Built from https://develop.svn.wordpress.org/branches/4.5@46009


git-svn-id: http://core.svn.wordpress.org/branches/4.5@45820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:40:35 +00:00
Sergey Biryukov d91ad3f2a1 Improve handling the existing `rel` attribute in `wp_rel_nofollow_callback()`.
Merges [45990] to the 4.5 branch.
Props xknown, sstoqnov.
Built from https://develop.svn.wordpress.org/branches/4.5@45999


git-svn-id: http://core.svn.wordpress.org/branches/4.5@45810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:54:21 +00:00
Sergey Biryukov 8558d3976f Improve URL validation in `wp_validate_redirect()`.
Merges [45971] to the 4.5 branch.
Props vortfu, whyisjake, peterwilsoncc.
Built from https://develop.svn.wordpress.org/branches/4.5@45980


git-svn-id: http://core.svn.wordpress.org/branches/4.5@45791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:13:42 +00:00
whyisjake 2d31982eaf Remove _convert_urlencoded_to_entities() from the get_the_content() callback.
Merges [45937] to the 4.5 branch.

Props vortfu, whyisjake, peterwilsoncc

Built from https://develop.svn.wordpress.org/branches/4.5@45957


git-svn-id: http://core.svn.wordpress.org/branches/4.5@45768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:41:21 +00:00
Gary Pendergast a55abbe18f WordPress 4.5.17
Built from https://develop.svn.wordpress.org/branches/4.5@44876


git-svn-id: http://core.svn.wordpress.org/branches/4.5@44707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-13 01:25:20 +00:00
Sergey Biryukov f056a36272 Formatting: Fix a PHP warning in introduced in [44840].
Merges [44864] to the 4.5 branch.
Built from https://develop.svn.wordpress.org/branches/4.5@44865


git-svn-id: http://core.svn.wordpress.org/branches/4.5@44696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-13 00:38:20 +00:00
Sergey Biryukov fb7f4bf7b6 Comments: Improve comment content filtering.
Merges [44842] to the 4.5 branch.
Built from https://develop.svn.wordpress.org/branches/4.5@44849


git-svn-id: http://core.svn.wordpress.org/branches/4.5@44681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 22:38:19 +00:00
Sergey Biryukov 4db371262e Formatting: Improve `rel="nofollow"` handling in comments.
Merges [44833] to the 4.5 branch.
Built from https://develop.svn.wordpress.org/branches/4.5@44840


git-svn-id: http://core.svn.wordpress.org/branches/4.5@44672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 22:25:20 +00:00
Jeremy Felt ab5c2ba564 Bump 4.5 branch to version 4.5.16.
Built from https://develop.svn.wordpress.org/branches/4.5@44082


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 02:14:25 +00:00
Peter Wilson baa754b110 Multisite: Validate activation links.
Merges [44048] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@44059


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 01:44:20 +00:00
iandunn a79ebd98e8 KSES: Make the URI attributes DRY.
This commit introduces the `wp_kses_uri_attributes` function and filter. The function centralizes the list of attributes, in order to prevent inconsistency, and the filter provides a way for plugins to customize the attributes.

Merges [44014] and [44017] to the `4.6` branch.

Built from https://develop.svn.wordpress.org/branches/4.5@44032


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 00:54:20 +00:00
Peter Wilson 42e2569843 Multisite: Improve messaging for previously activated users.
Ensure activation of a site is not attempted multiple times and users are shown the correct message if they follow the link a second time.

Merges [44021] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@44029


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 00:47:20 +00:00
Gary Pendergast 368895642d KSES: Conditionally remove the `<form>` element from `$allowedposttags`.
To avoid backwards compatibility issues, `<form>` is re-added if a custom filter has added the `<input>` or `<select>` elements to `$allowedposttags`.

Merges [43994] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@44002


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-12 23:29:21 +00:00
Jeremy Felt 822cb35130 Media: Improve verification of MIME file types.
Merges [43988] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@43993


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-12 23:11:21 +00:00
Aaron Campbell dce2bd647f Bump 4.5 branch to version 4.5.15
Built from https://develop.svn.wordpress.org/branches/4.5@43411


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-05 16:12:28 +00:00
John Blackbourn cde3e1022a Media: Limit thumbnail file deletions to the same directory as the original file.
Merges [43393] into the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@43397


git-svn-id: http://core.svn.wordpress.org/branches/4.5@43225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-05 14:55:23 +00:00
Aaron Campbell fff3ef94b7 Bump 4.5 branch to version 4.5.14
Built from https://develop.svn.wordpress.org/branches/4.5@42937


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 20:29:32 +00:00
Dominik Schilling 3465fda2e7 Template: Make sure the version string is correctly escaped for use in attributes.
Merge of [42893] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@42921


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 16:08:10 +00:00
Dominik Schilling 52e15eb4d6 Meta: Simplify the delete all meta query in `delete_metadata()`.
Merge of [42913] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@42916


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 15:43:03 +00:00
Dominik Schilling 764b72595b HTTP: Don't treat `localhost` as same host by default.
Merge of [42894] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@42912


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 15:37:53 +00:00
Dion Hulse 466e565a32 Bump the 4.5 branch to 4.5.13.
Built from https://develop.svn.wordpress.org/branches/4.5@42498


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 21:42:07 +00:00
Dion Hulse c5126cd06a External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Merges [42478] to the 4.5 branch.
Fixes #42720 for 4.5.

Built from https://develop.svn.wordpress.org/branches/4.5@42481


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 08:08:33 +00:00
John Blackbourn c33337c395 Bump 4.5 branch to 4.5.12.
Built from https://develop.svn.wordpress.org/branches/4.5@42320


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 19:00:32 +00:00
John Blackbourn db1e3afed0 Hardening: Remove the ability to upload JavaScript files for users who do not have the `unfiltered_html` capability.
Merges [42261] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@42283


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:27:34 +00:00
John Blackbourn 8511c84d2c Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
Merges [42260] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@42282


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:27:01 +00:00
John Blackbourn cc28f09509 Hardening: Add escaping to the language attributes used on `html` elements.
Merges [42259] to the 4.5 branch.

Built from https://develop.svn.wordpress.org/branches/4.5@42281


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:26:31 +00:00
Dion Hulse 4d65d6de5b WPDB: Check that `AUTH_SALT` is not empty, Fix a PHP notice when `AUTH_SALT` is undefined.
Props jsonfry, mkomar, pento.
Merges [42119] and [42120] to the 4.5 branch.
Fixes #42431 and #42401 for 4.5.

Built from https://develop.svn.wordpress.org/branches/4.5@42233


git-svn-id: http://core.svn.wordpress.org/branches/4.5@42062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 01:10:32 +00:00
Gary Pendergast 512427a740 Bump 4.5 branch to version 4.5.11.
Built from https://develop.svn.wordpress.org/branches/4.5@42072


git-svn-id: http://core.svn.wordpress.org/branches/4.5@41901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 13:16:30 +00:00
Gary Pendergast 84b702009b Database: Restore numbered placeholders in `wpdb::prepare()`.
[41496] removed support for numbered placeholders in queries send through `wpdb::prepare()`, which, despite being undocumented, were quite commonly used.

This change restores support for numbered placeholders (as well as a subset of placeholder formatting), while also adding extra checks to ensure the correct number of arguments are being passed to `wpdb::prepare()`, given the number of placeholders.

Merges [41662], [42056] to the 4.5 branch.
See #41925.


Built from https://develop.svn.wordpress.org/branches/4.5@42060


git-svn-id: http://core.svn.wordpress.org/branches/4.5@41889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 12:44:32 +00:00
Dominik Schilling 5047d9b8db Bump 4.5 branch to version 4.5.10.
Built from https://develop.svn.wordpress.org/branches/4.5@41513


git-svn-id: http://core.svn.wordpress.org/branches/4.5@41346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 20:01:31 +00:00
Aaron Campbell 9007b3117b Database: Hardening to bring `wpdb::prepare()` inline with documentation.
`wpdb::prepare()` supports %s, %d, and %F as placeholders in the query string. Any other non-escaped % will be escaped.

Merges [41496] to 4.5 branch.


Built from https://develop.svn.wordpress.org/branches/4.5@41500


git-svn-id: http://core.svn.wordpress.org/branches/4.5@41333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 18:14:31 +00:00
Aaron Campbell 4b09915583 Database: Don’t trigger `_doing_it_wrong()` for null values in `wpdb::prepare()`.
While `wpdb::prepare()` does not support null values (see #12819) they still appear in the wild like in the WordPress Importer and other plugins.

Merges [41483] to 4.5 branch.


Built from https://develop.svn.wordpress.org/branches/4.5@41487


git-svn-id: http://core.svn.wordpress.org/branches/4.5@41320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 16:23:33 +00:00