27570 Commits

Author SHA1 Message Date
John Blackbourn
239c1aaa46 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.0 branch.

See #46632


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@45003 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-25 00:59:36 +00:00
Gary Pendergast
33e6bdde15 WordPress 4.0.26
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44886 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-13 01:55:36 +00:00
Sergey Biryukov
95d7a7b13d Comments: Improve comment content filtering.
Merges [44842] to the 4.0 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44854 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:48:31 +00:00
Jeremy Felt
aec7018d12 Bump 4.0 branch to version 4.0.25.
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44087 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 02:14:08 +00:00
Gary Pendergast
d95bed11a2 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.0 branch.



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


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44069 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 01:55:22 +00:00
Ian Dunn
2a949e87e7 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.0` branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44044 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 01:18:07 +00:00
Peter Wilson
56d27f9269 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.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44037 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 01:00:49 +00:00
Gary Pendergast
6c2b785e29 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.0 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44015 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 23:54:55 +00:00
Jeremy Felt
08b16c7bdc Media: Improve verification of MIME file types.
Merges [43988] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@44009 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 23:42:34 +00:00
Aaron D. Campbell
a2d9ae8bbb Bump 4.0 branch to version 4.0.24
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@43416 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 16:10:58 +00:00
John Blackbourn
065ed1deb2 Media: Limit thumbnail file deletions to the same directory as the original file.
Merges [43393] into the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@43402 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 15:10:39 +00:00
Aaron D. Campbell
f6aa5864f6 Bump 4.0 branch to version 4.0.23
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42942 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 20:29:58 +00:00
Dominik Schilling (ocean90)
5a1f069b9c Template: Make sure the version string is correctly escaped for use in attributes.
Merge of [42893] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42926 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 16:06:18 +00:00
Dominik Schilling (ocean90)
9575ef40f6 Login: Use wp_safe_redirect() when redirecting the login page if forced to use HTTPS.
Merge of [42892] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42904 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 15:29:21 +00:00
Sergey Biryukov
70284fdbe4 General: Update copyright year to 2018 in license.txt.
Props rachelbaker.
Merges [42424] to the 4.0 branch.
Fixes #43007.

git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42561 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 11:26:32 +00:00
Dion Hulse
95e7533ff9 Bump the 4.0 branch to 4.0.22.
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42503 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 21:45:16 +00:00
Dion Hulse
5fdcd8c1a0 External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Merges [42478] to the 4.0 branch.
Fixes #42720 for 4.0.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42486 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 08:13:41 +00:00
Dion Hulse
40dfd9850f Upgrade: When deleting old files, if deletion fails attempt to empty the file instead.
Props joemcgill, dd32.
Merges [42434] to the 4.0 branch.
Fixes #42963 for 4.0.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42474 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 06:56:50 +00:00
John Blackbourn
3150de24a8 Bump 4.0 branch to version 4.0.21.
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42325 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 19:02:58 +00:00
John Blackbourn
e0a8b9c0b7 Hardening: Remove the ability to upload JavaScript files for users who do not have the unfiltered_html capability.
Merges [42261] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42303 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:38:34 +00:00
John Blackbourn
dd47166288 Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
Merges [42260] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42302 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:38:05 +00:00
John Blackbourn
341eed406b Hardening: Add escaping to the language attributes used on html elements.
Merges [42259] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42301 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:37:32 +00:00
John Blackbourn
0a13d8689f Hardening: Use a properly generated hash for the newbloguser key instead of a determinate substring.
Merges [42258] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42300 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:36:53 +00:00
Dion Hulse
29078bd8d3 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.0 branch.
Fixes #42431 and #42401 for 4.0.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42238 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-27 01:12:10 +00:00
John Blackbourn
e450a97c88 General: Remove the version number from the readme file in the 4.0 branch.
See #42386


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42096 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 18:01:10 +00:00
Gary Pendergast
09260c38a3 Bump 4.0 branch to version 4.0.20.
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42077 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 13:43:30 +00:00
Gary Pendergast
137e6209fc 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.0 branch.
See #41925.



git-svn-id: https://develop.svn.wordpress.org/branches/4.0@42065 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 12:54:43 +00:00
Dominik Schilling (ocean90)
6a81424335 Users: Use correct escaping function for URLs.
Merge of [41522] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41531 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 21:38:55 +00:00
Aaron D. Campbell
71d722eddc Bump 4.0 branch to version 4.0.19.
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41518 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 20:09:49 +00:00
Aaron D. Campbell
180bee28da 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.0 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41505 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 18:41:11 +00:00
Aaron D. Campbell
2f2de7d65c 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.0 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41492 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 16:24:51 +00:00
Aaron D. Campbell
6d783b9968 Database: Hardening for wpdb::prepare()
Previously if you passed an array of values for placeholders, additional values could be passed as well. Now additional values will be ignored.

Merges [41470] to 4.0 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41479 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 15:02:25 +00:00
John Blackbourn
8f650d217e Filesystem API: Ensure filenames are valid before attempting to unzip them to ensure malformed file paths don't cause issues.
Merges [41457] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41466 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 14:42:44 +00:00
John Blackbourn
016f8327af General: Add missing URL-encoding and add extra hardening to plugin and template names when they're displayed in the admin area.
Merges [41434] with changes to the 4.0 branch.

See #13377


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41447 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 13:41:08 +00:00
Dominik Schilling (ocean90)
a2c802282e TinyMCE: Improve the previews for shortcodes.
Merge of [41395] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41443 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 12:40:31 +00:00
Dominik Schilling (ocean90)
9e24c9a25b Users: Provide a fallback for incorrect HTTP referrers.
Merge of [41398] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41425 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 11:10:47 +00:00
Dominik Schilling (ocean90)
ce414d87a5 Editor: Prevent adding javascript: and data: URLs through the inline link dialog.
Merge of [41393] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41408 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 10:15:33 +00:00
John Blackbourn
c631f47c09 Build/Test tools: Remove failing tests from the 4.0 branch.
See #41706


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41306 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 20:17:06 +00:00
John Blackbourn
36746c9b09 Remove failing test related to post galleries in the 4.0 branch.
See #30284.

Merges [30285] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41304 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 19:05:13 +00:00
John Blackbourn
cf6141ec98 Build/Test tools: Use the latest in the 4.x and 5.x branches of PHPUnit when running tests on Travis for the 4.0 branch.
See #41472


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41303 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 17:28:53 +00:00
John Blackbourn
cfe3166416 Set current user to 0 after each unit test.
Merges [30001] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41085 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 21:45:46 +00:00
John Blackbourn
4b5d60b300 Build: Switch PHP 5.2 to Travis' Ubuntu precise image for the 4.0 branch.
See #41292


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@41082 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 14:51:45 +00:00
John Blackbourn
395373f133 Build/Test Tools: Remove mentions of HHVM from the test infrastructure on Travis for the 4.0 branch.
See #40548


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40833 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-24 14:34:40 +00:00
Aaron D. Campbell
c085ef33e1 Bump 4.0 branch to version 4.0.18.
git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40755 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 21:51:30 +00:00
Pascal Birchler
e4bf4f352f Media: Simplify upload error message construction.
Merges [40736] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40744 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 18:02:17 +00:00
Aaron D. Campbell
a7749dee65 Add nonce for updating file system credentials.
Merges [40723] to 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40731 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 14:55:29 +00:00
Dominik Schilling (ocean90)
7ac71f2c9c Customize: Ignore invalid customization sessions.
Merge of [40704] to the 4.0 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40712 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 12:19:44 +00:00
Pascal Birchler
7aa05be158 Adjust post meta checks
Merges [40692] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40700 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:52:00 +00:00
Pascal Birchler
5475acded4 Whitelist post arguments in XML-RPC
Merges [40677] to the 4.0 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40685 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:26:41 +00:00