36292 Commits

Author SHA1 Message Date
Jonathan Desrosiers
e6dd09a0fb Build/Test Tools: Ignore patch related files, so they can't be accidentally committed.
Merges [39360-39361] to the 4.7 branch.
See #52341.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@50205 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 04:14:10 +00:00
Jonathan Desrosiers
0f989b3ae3 Build/Test Tools: Support NodeJS 14.x in the 4.7 branch.
This updates the 4.7 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.

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.7, dependencies that were removed in future releases have also been updated to their latest versions.

Props desrosj, dd32, netweb, jorbin.
Merges [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.7 branch.
See #52341.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@50204 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 04:12:00 +00:00
Sergey Biryukov
c0f53ac48f Tests: Move skipTestOnTimeout() to a more appropriate location, for consistency with other branches.
Follow-up to [50088].

See #51669.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@50097 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-30 15:21:27 +00:00
Sergey Biryukov
8259505de8 Tests: Use skipTestOnTimeout() in more HTTP tests.
Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

Merges [43511], [43512], [46682], [46996] to the 4.7 branch.
See #51669.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@50088 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-30 11:29:34 +00:00
Jonathan Desrosiers
e972b674ac Build/Test Tools: Remove the TravisCI configuration file.
In [49162], GitHub Action workflow configuration files were introduced to run all of Core’s automated testing with the intent to fully transition after some time was allowed for testing.

After two full months of testing, the time to finish this transition has come.

We thank TravisCI for testing the codebase through nearly 20 major and many more minor releases.

Merges [49876] to the 4.7 branch.
See #52161. See #50401.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@49886 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 21:09:31 +00:00
Jake Spurlock
10b35a3e1a Build/Test Tools: Match .nvmrc with the declared node engine.
Let's match up the versions from package.json, .travis.yml and .nvmrc.

This brings the changes from [49653] to the 4.7 branch.

Fixes #51682.

Props SergeyBiryukov, desrosj, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@49655 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-18 22:46:31 +00:00
Jonathan Desrosiers
181144c200 Build/Test Tools: Backport the local Docker environment to the 4.7 branch.
This commit introduces the Docker-based local WordPress development environment to the 4.7 branch and converts the Travis test jobs to utilize this environment for easier and more consistent testing.

Until existing blockers with the PHP 5.2 Docker container can be solved, the PHP 5.2 test job will remain using the Travis `precise` image.

Merges [45745,45762,45783-45784,45800,45819,45885,46320,46999,47225,47912,48121,49335,49358,49360,49362] to the 4.7 branch.
See #48301, #47767.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@49532 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 17:37:22 +00:00
Jonathan Desrosiers
bbfaa06ce8 Tests: Fix an incorrect variable name in PDF tests.
This causes a PHP error when running the test suite with PDF rendering supported.

Merges [49523] to the 4.7 branch.
See #50573, #48301.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@49526 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 17:05:59 +00:00
Jonathan Desrosiers
cf88f30bc2 Media: Improve and fix rotate/flip image tests.
Fix off-by-one error in pixel color checks for rotate and flip image tests. Change to using PNG with single pixel to ensure that errors are caught in the future, rather than lost in JPEG noise.

Props Fuegas, mikeschroder.
Merges [45067] to the 4.7 branch.
See #46073, #48301.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@49521 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 16:54:38 +00:00
Jonathan Desrosiers
d0a5188a5d WordPress 4.7.19.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@49417 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-29 19:33:55 +00:00
Jake Spurlock
1bc66eba08 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.7 branch.

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


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@49399 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-29 18:56:04 +00:00
Sergey Biryukov
dcb81721c5 Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.
Merges [48338], [48341] to the 4.7 branch.

See #50573.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@48489 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 21:51:43 +00:00
Sergey Biryukov
972c33c68c 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 4.7 branch.
Fixes #50392.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@48251 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-01 09:47:47 +00:00
Jonathan Desrosiers
18d5a54861 WordPress 4.7.18.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47996 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 21:32:22 +00:00
Jake Spurlock
55f1e1fab7 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.7 branch.

Props xknown, sstoqnov, vortfu, SergeyBiryukov, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47978 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 18:46:19 +00:00
Jake Spurlock
b14fee9884 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.X branch.

Props xknown, sstoqnov, vortfu, SergeyBiryukov, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47975 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 18:43:14 +00:00
Sergey Biryukov
c7f320da2b Update the About page for WordPress 4.7.17
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47697 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:33:38 +00:00
Jonathan Desrosiers
050f26a12d WordPress 4.7.17
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47673 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 17:56:08 +00:00
Jake Spurlock
f9be892b76 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.
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], [47637], and [47638] to the 4.7 branch.

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


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47650 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 16:22:22 +00:00
Sergey Biryukov
154764394d 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/4.7@47489 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-22 14:29:03 +00:00
Sergey Biryukov
b14c1f6b97 Embeds: Remove the external oEmbed tests for YouTube.
These tests no longer test anything that WordPress core has control over. YouTube now serves everything
over HTTPS by default, so the tests for #23149 will always pass, and the tests for #32714 aren't testing
anything that core has control over.

Tests for the responses from oEmbed providers has been attempted and reverted in #32360.

Props johnbillion.
Merges [41712] to the 4.4 branch.
See #42076, #32714, #23149.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47483 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-22 13:57:09 +00:00
Sergey Biryukov
a306848d73 Embeds: Remove the external oEmbed tests for YouTube.
These tests no longer test anything that WordPress core has control over. YouTube now serves everything
over HTTPS by default, so the tests for #23149 will always pass, and the tests for #32714 aren't testing
anything that core has control over.

Tests for the responses from oEmbed providers has been attempted and reverted in #32360.

Props johnbillion.
Merges [41712] to the 4.7 branch.
See #42076, #32714, #23149.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47480 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-22 13:45:11 +00:00
Sergey Biryukov
528ad89d28 WordPress 4.7.16
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@46926 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 20:27:25 +00:00
Sergey Biryukov
ba95a9a719 Ensure that a user can publish_posts before making a post sticky.
Props: danielbachhuber, whyisjake, peterwilson, xknown.

Brings r46893 to the 4.7 branch.

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 4.7 branch.

Props: xknown, nickdaugherty, peterwilsoncc.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@46916 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 18:51:18 +00:00
Jonathan Desrosiers
6b00370dde WordPress 4.7.15.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@46513 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 20:07:03 +00:00
Jake Spurlock
375d3d8775 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 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@46495 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 18:49:56 +00:00
Jake Spurlock
6e41ed6192 Add .nvmrc files to older versions of WordPress
When jumping between branches, it would be nice to have the correct node version for the older versions of WordPress. Let's add .nvmrc files to these older branches for the supported versions.

Merges [46295] to the 4.7 branch.

Fixes #48140



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@46297 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-25 20:54:05 +00:00
Jonathan Desrosiers
101562b7cd WordPress 4.7.14.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@46041 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 21:22:13 +00:00
Andrew Ozz
69466c4e92 jQuery: Backport the patch from jQuery 3.4.0.
Merges [45342] to the 4.7 branch.

Props MikeNGarrett, peterwilsoncc, azaozz.
Fixes #47020.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@46025 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:44:36 +00:00
Jonathan Desrosiers
7d32848c55 Fix for URL sanitization in wp_kses_bad_protocol_once().
Merges [45997] to the 4.7 branch.

Props irsdl, sstoqnov, whyisjake.

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

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

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@45977 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 17:10:39 +00:00
Jake Spurlock
707096e9e0 Remove _convert_urlencoded_to_entities() from the get_the_content() callback.
Merges [45937] to the 4.7 branch.

Props vortfu, whyisjake, peterwilsoncc


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

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@45947 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:34:50 +00:00
John Blackbourn
7cb146f92a Build/Test tools: Further trimming of CI jobs on the 4.7 branch.
This 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 [45005] into the 4.7 branch.

See #42387


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@45008 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-25 16:26:30 +00:00
John Blackbourn
22197bb051 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 4.7 branch.

See #46632


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44998 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-25 00:56:45 +00:00
Gary Pendergast
8ce540c75a WordPress 4.7.13
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44872 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-13 01:12:46 +00:00
Sergey Biryukov
1961df533b Comments: Improve comment content filtering.
Merges [44842] to the 4.7 branch.

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

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44838 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:21:44 +00:00
Jeremy Felt
bf9a7a79cc Bump 4.7 branch to version 4.7.12.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44080 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 02:11:39 +00:00
Gary Pendergast
78e2bde3cd Editor: Remove unwanted fields before saving posts.
The `meta_input`, `file`, and `guid` fields are not intended to be updated through user input.

Merges [44047] to the 4.7 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44056 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 01:40:40 +00:00
Peter Wilson
ea84b9bad8 Multisite: Validate activation links.
Merges [44048] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44054 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 01:38:24 +00:00
Ian Dunn
a3fc848cb6 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.7` branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44027 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 00:43:21 +00:00
Peter Wilson
e4b7c0bf40 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.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44026 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 00:39:23 +00:00
Gary Pendergast
3cdf982fff 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.7 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@44000 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 23:24:50 +00:00
Jeremy Felt
efd9885803 Media: Improve verification of MIME file types.
Merges [43988] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@43991 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 23:04:17 +00:00
Aaron D. Campbell
3e822cbf1c Bump 4.7 branch to version 4.7.11
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@43409 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 16:10:24 +00:00
John Blackbourn
824d5b6bd3 Media: Limit thumbnail file deletions to the same directory as the original file.
Merges [43393] into the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@43395 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 14:50:26 +00:00
Aaron D. Campbell
c993a967e6 Bump 4.7 branch to version 4.7.10
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@42935 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 20:26:02 +00:00
Dominik Schilling (ocean90)
3700a18382 Template: Make sure the version string is correctly escaped for use in attributes.
Merge of [42893] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@42919 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 16:05:30 +00:00