John Blackbourn
47c076a77b
Hardening: Remove the ability to upload JavaScript files for users who do not have the unfiltered_html
capability.
...
Merges [42261] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@42271
git-svn-id: http://core.svn.wordpress.org/branches/4.8@42100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:16:05 +00:00
John Blackbourn
3995f1e60f
Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
...
Merges [42260] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@42270
git-svn-id: http://core.svn.wordpress.org/branches/4.8@42099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:15:34 +00:00
John Blackbourn
c5713fc570
Hardening: Add escaping to the language attributes used on html
elements.
...
Merges [42259] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@42269
git-svn-id: http://core.svn.wordpress.org/branches/4.8@42098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:14:07 +00:00
John Blackbourn
2aba074c5b
Hardening: Use a properly generated hash for the newbloguser
key instead of a determinate substring.
...
Merges [42258] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@42268
git-svn-id: http://core.svn.wordpress.org/branches/4.8@42097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:13:35 +00:00
John Blackbourn
8101b2aa4d
Users: Correct the value of the lang
attribute in the admin area.
...
This corrects the value when the user's language is set to `English (United States)` but the site language is not.
Props ocean90, afercia
See #42242
Merges [42220] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@42262
git-svn-id: http://core.svn.wordpress.org/branches/4.8@42091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:05:34 +00:00
Dion Hulse
9eb5084390
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.8 branch.
Fixes #42431 and #42401 for 4.8.
Built from https://develop.svn.wordpress.org/branches/4.8@42230
git-svn-id: http://core.svn.wordpress.org/branches/4.8@42059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 01:07:34 +00:00
Dion Hulse
5f52157d46
Bump Akismet external to 4.0.1.
...
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 03:10:32 +00:00
Gary Pendergast
3fdaf059b9
Bump 4.8 branch to version 4.8.3.
...
Built from https://develop.svn.wordpress.org/branches/4.8@42069
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 13:07:32 +00:00
Gary Pendergast
a59f4bc10f
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.8 branch.
See #41925 .
Built from https://develop.svn.wordpress.org/branches/4.8@42057
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 12:23:33 +00:00
Dion Hulse
d290d5c257
Bump Akismet to 4.0.
...
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-26 07:51:58 +00:00
Dominik Schilling
c38ae9a68f
Taxonomy/Users: Use correct escaping function for URLs.
...
Merge of [41522] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41523
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 21:20:32 +00:00
Dominik Schilling
27433a5d25
Bump 4.8 branch to version 4.8.2.
...
Built from https://develop.svn.wordpress.org/branches/4.8@41509
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 19:42:33 +00:00
Aaron Campbell
1b16fc95d8
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.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41497
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 18:11:31 +00:00
Aaron Campbell
7b17c71213
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.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41484
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 16:19:32 +00:00
Aaron Campbell
109695b948
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.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41471
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 14:55:32 +00:00
John Blackbourn
3e77adc619
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.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41458
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 14:37:33 +00:00
Aaron Campbell
a9b03b1b80
oEmbed: Add extra hardening around allowed HTML for improved sandboxing.
...
Merges [41448] to 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41450
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 13:47:33 +00:00
Dominik Schilling
40074d31a0
TinyMCE: Improve the previews for shortcodes.
...
Merge of [41395] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41435
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 12:41:32 +00:00
Dominik Schilling
460edb5519
Customize: Ensure valid themes in the preview.
...
Merge of [41397] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41429
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 11:50:31 +00:00
Dominik Schilling
07e1f9a6ca
Taxonomy/Users: Provide a fallback for incorrect HTTP referrers.
...
Merge of [41398] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41417
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 11:11:33 +00:00
John Blackbourn
846bd22a79
General: Add missing URL-encoding and add extra hardening to plugin and template names when they're displayed in the admin area.
...
Merges [41399], with additions, to the 4.8 branch.
See #13377
Built from https://develop.svn.wordpress.org/branches/4.8@41412
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 10:21:16 +00:00
Dominik Schilling
1647b11bf4
Editor: Prevent adding javascript:
and data:
URLs through the inline link dialog.
...
Merge of [41393] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41400
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 10:15:32 +00:00
Dominik Schilling
a905eb3690
Emoji: Invert value returned by UN test for accuracy.
...
The JavaScript testing for UN flag support was passing when it failed, and failing when it passes.
This inverts the result to take more traditional approach of returning the correct result.
Merge of [41386] to the 4.8 branch.
Unprops Pento.
Fixes #41852 .
Built from https://develop.svn.wordpress.org/branches/4.8@41396
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 08:29:33 +00:00
Dominik Schilling
d75fad697d
Emoji: Update Twemoji to 2.5.0.
...
* Twemoji 2.3.0 has a rendering issue in Safari, emoji can sometimes be followed by U+FEOF (which is just a flag meaning "render the preceding character as emoji).
* Twemoji wasn't catching this character correctly, and Safari rendered it incorrectly.
* Twemoji 2.5.0 resolves this issue.
Merge of [41250] to the 4.8 branch.
Props peterwilsoncc.
Fixes #41584 .
Built from https://develop.svn.wordpress.org/branches/4.8@41394
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 08:04:33 +00:00
Dominik Schilling
b7d54dd918
Widgets: Prevent visual Text widget from decoding encoded HTML.
...
Also apply `the_editor_content` filters on widget `text` with `format_for_editor()` as is done for the post editor.
Merge of [41260] to the 4.8 branch.
Amends [40631].
Props westonruter, azaozz.
See #35243 .
Fixes #41596 .
Built from https://develop.svn.wordpress.org/branches/4.8@41392
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 07:44:32 +00:00
Dominik Schilling
d82e0f5c86
Widgets: Suppress PHP warnings raised by DOMDocument::loadHTML()
in WP_Widget_Text::is_legacy_instance()
which could appear in Text widget forms.
...
Also explicitly use HTML5 doctype when parsing Text widget contents in legacy mode detection.
Merge of [41251] to the 4.8 branch.
Amends [41050].
See #40951 .
Fixes #41622 .
Built from https://develop.svn.wordpress.org/branches/4.8@41391
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 07:39:33 +00:00
Dominik Schilling
9cbea2762a
Bump Akismet external to 3.3.4.
...
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 20:11:08 +00:00
Dominik Schilling
93ba8ea6fb
I18N: Allow numbers in locales during installation.
...
The current regex was a bit to strict for locales like `pt_PT_ao90` which were already supported by `wp_get_installed_translations()`.
Merge of [41335] to the 4.8 branch.
See #41794 .
Built from https://develop.svn.wordpress.org/branches/4.8@41336
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 19:38:33 +00:00
John Blackbourn
795af804ba
Build/Test tools: Use the latest in the 4.x and 6.x branches of PHPUnit when running tests on Travis for the 4.8 branch.
...
See #41472
Merges [41294] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41295
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 17:10:35 +00:00
Weston Ruter
a0153f27c8
Post-4.8.1 version bump for 4.8 branch.
...
Built from https://develop.svn.wordpress.org/branches/4.8@41212
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 21:38:34 +00:00
Weston Ruter
e10af224e2
Bump 4.8 branch to version 4.8.1.
...
Built from https://develop.svn.wordpress.org/branches/4.8@41210
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 20:58:32 +00:00
Weston Ruter
a9897ef218
Post-WordPress 4.8.1 RC2 version bump.
...
Built from https://develop.svn.wordpress.org/branches/4.8@41203
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 22:28:31 +00:00
Weston Ruter
546dcf7fed
WordPress 4.8.1 RC2.
...
Built from https://develop.svn.wordpress.org/branches/4.8@41202
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 22:21:32 +00:00
Peter Westwood
30f39b93be
Emoji: Revert [41069] as the new Regular Expressions performance on balance significantly worse that the old ones.
...
See #35293 props @jmdodd
Built from https://develop.svn.wordpress.org/branches/4.8@41201
git-svn-id: http://core.svn.wordpress.org/branches/4.8@41041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 21:16:34 +00:00
Gary Pendergast
fee9368d46
REST API: Update the fixture data for wp-api.js
tests.
...
[41139] changed how the REST API URL is generated, but included an incorrect version of `wp-api-generated.js`.
This updates the generator to create the correct `wp-api-generated.js`, and updates ``wp-api-generated.js`.
Repeat of [41154], in the 4.8 branch.
Fixes #40886 .
Built from https://develop.svn.wordpress.org/branches/4.8@41155
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 04:06:36 +00:00
Weston Ruter
b9d2c50edd
Post-WordPress 4.8.1 RC 1 version bump.
...
Built from https://develop.svn.wordpress.org/branches/4.8@41144
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 03:20:36 +00:00
Weston Ruter
be70069a0a
WordPress 4.8.1 RC1.
...
Built from https://develop.svn.wordpress.org/branches/4.8@41143
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 03:00:36 +00:00
Weston Ruter
7eccdc89e7
TinyMCE: Fix styling of selected state for linked images containing captions.
...
Merges [41141] onto 4.8 branch.
Props azaozz.
Fixes #41408 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41142
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 02:21:34 +00:00
Gary Pendergast
7cdc8af10c
REST API: Always add index.php
to the REST URL when pretty permalinks are disabled.
...
When pretty permalinks are disabled, the web server will internally forward requests to `index.php`. Unfortunately, nginx only forwards HTTP/1.0 methods: `PUT`, `PATCH`, and `DELETE` methods will return a 405 error.
To work around this nginx behaviour, including `index.php` in the REST URL skips the internal redirect.
Merges 41139 to the 4.8 branch.
Fixes #40886 .
Built from https://develop.svn.wordpress.org/branches/4.8@41140
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 00:54:36 +00:00
Weston Ruter
cbfc476b43
Customize: Update Text widget starter content to utilize visual mode.
...
Merges [41136] onto 4.8 branch.
Amends [38991].
Props dlh, westonruter.
See #35243 , #38114 .
Fixes #41410 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41137
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:27:36 +00:00
Weston Ruter
a17fcecfda
Widgets: Improve notice in Text widget's legacy mode.
...
Retains 'new' in notice on 4.8 branch, in contrast with [41134]. Also fixes phpunit test which broke in [41132].
Merges [41134] onto 4.8 branch.
Props melchoyce, westonruter.
See #41394 , #35243 , #40951 , #40907 .
Fixes #41386 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41135
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:15:34 +00:00
Weston Ruter
fd423f720e
Widgets: Rename Text widget's legacy
mode to non-visual
mode, restore boolean filter
prop, and improve compatibility for widget_text
filters applied in Custom HTML widget.
...
Merges [41132] onto 4.8 branch.
Amends [41050].
Props westonruter, obenland, timmydcrawford for testing.
See #35243 , #40951 , #40907 .
Fixes #41394 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41133
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:54:34 +00:00
Weston Ruter
74314b2ddb
Bump package.json version to 4.8.1 to fix Tests_Basic::test_package_json failure
...
Built from https://develop.svn.wordpress.org/branches/4.8@41130
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:30:34 +00:00
Weston Ruter
6be40b7a13
WP-API JS Client: Interpret Settings resource as a model.
...
The REST API does not provide a mechanism to distinguish between endpoints representing models and those representing collections, so the Backbone client must make that distinction internally. Previously wp-api.js accounted for `/users/me`, but not for `/settings`. This patch updates the logic so that `/settings` is properly registered as a Backbone model.
When calling `wp.api.init`, additional endpoints can be specified to be models using the `modelEndpoints` argument.
Merges [41112] onto 4.8 branch.
Props adamsilverstein, kadamwhite.
Fixes #41056 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41126
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 20:46:38 +00:00
Weston Ruter
96da852a31
Widgets: Improve theme styling compatibility for Custom HTML widget by adding content container with textwidget
class and widget_text
class on widget wrapper element.
...
The same styling from the Text widget should apply to the Custom HTML widget since users are expected to copy HTML from the (legacy) Text widget into the latter.
Merges [41115] and partially [41116] onto 4.8 branch.
Amends [40893].
See #40907 .
Fixes #41392 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41117
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 21:17:37 +00:00
Weston Ruter
6ce522414f
Post-WordPress 4.8.1 Beta 1 version bump
...
Built from https://develop.svn.wordpress.org/branches/4.8@41098
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 00:52:36 +00:00
Weston Ruter
fc475c2d71
WordPress 4.8.1 Beta 1
...
Built from https://develop.svn.wordpress.org/branches/4.8@41097
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 00:09:35 +00:00
Weston Ruter
ff0656e37c
Widgets: Improve Text widget's reliability in syncing Visual tab's contents with Text tab and with hidden sync inputs.
...
Merges [41094] onto 4.8 branch.
Amends [40631].
Props azaozz, westonruter, rinkuyadav999 for testing.
See #35243 .
Fixes #40974 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41095
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 20:51:33 +00:00
Weston Ruter
8575d4e180
REST API: Add a filter to allow modifying the response *after* embedded data is added.
...
Merges [40961] onto 4.8 branch.
Props jnylen0.
Fixes #38964 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41093
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 20:12:38 +00:00
Weston Ruter
aef4b48187
Widgets: Check for existence of wp.customize.state
before attempting to access in Text widget.
...
Merges [41088] onto 4.8 branch.
Amends [40631].
See #35243 .
Fixes #41361 for 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41089
git-svn-id: http://core.svn.wordpress.org/branches/4.8@40929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 22:40:37 +00:00