Commit Graph

361 Commits

Author SHA1 Message Date
tellyworth
1d730f20e5 Upgrade/Install: Don't run signature verify on slow 32-bit systems.
The sodium_compat library can be very slow for certain operations on 32-bit architectures, which can lead to web server timeouts while attempting to verify an update. This adds a runtime speed check to skip signature verification on systems that would otherwise time out. Includes simple unit tests.

Props dd32, paragoninitiativeenterprises.
See #47186.

Built from https://develop.svn.wordpress.org/trunk@45345


git-svn-id: http://core.svn.wordpress.org/trunk@45156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 11:06:53 +00:00
desrosj
d0f46bf73c I18N: Combine similar strings with minor differences.
Props dimadin.
Fixes #47158.
Built from https://develop.svn.wordpress.org/trunk@45298


git-svn-id: http://core.svn.wordpress.org/trunk@45107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-09 19:48:53 +00:00
Sergey Biryukov
8b333f8c20 Docs: Use 3-digit, x.x.x style semantic versioning for @since 5.2.0 entries in wp-admin/includes/file.php.
See #46543.
Built from https://develop.svn.wordpress.org/trunk@45266


git-svn-id: http://core.svn.wordpress.org/trunk@45075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-24 23:36:51 +00:00
tellyworth
ed802428e3 Upgrade/install: fix verification bugs and scale back signature checks.
This fixes several bugs in the signature verification code:
Disables signature checks on certain incompatible PHP versions that cause math errors when opcache is enabled;
Prevents a spurious URL and subsequent error when downloading a zip file with query arguments;
Prevents errors triggered by third-party upgrade scripts as per #46615;
Disables signature tests for Plugins, Themes, and Translations, leaving only core updates.

At the 5.2 release the API servers will only provide signatures for core update packages, which is why messages are suppressed for plugins and other package types. Signatures for those other items will become available later.

Props dd32.
See #39309, #46615


Built from https://develop.svn.wordpress.org/trunk@45262


git-svn-id: http://core.svn.wordpress.org/trunk@45071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-24 07:44:51 +00:00
Sergey Biryukov
d2ccaacedf Docs: Correct spelling in various comments and DocBlocks, per the conventions in Core Contributor Handbook.
Props man4toman, samanehmirrajabi.
Fixes #45857.
Built from https://develop.svn.wordpress.org/trunk@45232


git-svn-id: http://core.svn.wordpress.org/trunk@45041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 13:26:51 +00:00
John Blackbourn
d4d1267847 I18N: Improvements to and additions of translator comments for various email subject strings.
Props ramiy

Fixes #46920

Built from https://develop.svn.wordpress.org/trunk@45204


git-svn-id: http://core.svn.wordpress.org/trunk@45013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-15 22:39:50 +00:00
desrosj
e04ffc348b Administration: Remove unnecessary numbered placeholders.
Props: tobifjellner, thrijith.
Fixes #46824.
Built from https://develop.svn.wordpress.org/trunk@45167


git-svn-id: http://core.svn.wordpress.org/trunk@44976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 16:32:50 +00:00
Gary Pendergast
cbc0240cd6 Privacy: Only mark a personal data export as complete when the user downloads it.
An admin may download an export to check that it's all correct, but this action shouldn't mark the request as complete.

Props garrett-eclipse, JoshuaWold, birgire.
Fixes #44644.


Built from https://develop.svn.wordpress.org/trunk@45148


git-svn-id: http://core.svn.wordpress.org/trunk@44957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-09 00:04:50 +00:00
tellyworth
23fe2800cc Upgrade/Install: Add more context in signature verify failures.
This includes version numbers and signature counts in error reports, to help diagnose isolated failures that have no apparent cause.

Props dd32.
See #39309.

Built from https://develop.svn.wordpress.org/trunk@45112


git-svn-id: http://core.svn.wordpress.org/trunk@44921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-05 05:20:51 +00:00
Sergey Biryukov
5291f46c8a Docs: Fix typo in a comment in unzip_file().
Props mukesh27.
Fixes #46766.
Built from https://develop.svn.wordpress.org/trunk@45098


git-svn-id: http://core.svn.wordpress.org/trunk@44907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-02 13:34:53 +00:00
Sergey Biryukov
10409c0f7c Privacy: Ensure the personal data export email is sent in the locale of the user whose data is being exported (or the site's default locale if they are not a registered user) when the administrator fulfilling the request uses a different locale.
Props garrett-eclipse.
Fixes #46056.
Built from https://develop.svn.wordpress.org/trunk@45062


git-svn-id: http://core.svn.wordpress.org/trunk@44871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 21:29:50 +00:00
Sergey Biryukov
7d74080b80 Privacy: Introduce Privacy Policy page helpers:
* `is_privacy_policy()` template tag
* `privacy-policy.php` template
* `.privacy-policy` body class
* `.menu-item-privacy-policy` menu item class

Props garrett-eclipse, birgire, xkon, Clorith.
Fixes #44005.
Built from https://develop.svn.wordpress.org/trunk@44966


git-svn-id: http://core.svn.wordpress.org/trunk@44797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 19:48:50 +00:00
tellyworth
e38814f359 Upgrade/Install: Add experimental package signing to some updates.
This adds code for soft verification of signatures for theme and plugin installs and updates, when provided by the update server. This experimental version does not reject unverified packages or failed signatures; it simply reports anonymous errors so we can evaluate its feasibility and detect incompatibilities.

This code relies on the new sodium_compat library for PHP versions prior to 7.2.

Props dd32, paragoninitiativeenterprises.
See #39309, #45806.

Built from https://develop.svn.wordpress.org/trunk@44954


git-svn-id: http://core.svn.wordpress.org/trunk@44785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 05:49:50 +00:00
desrosj
26ab5fcee1 Privacy: Be less restrictive of the HTML tags allowed in user data exports.
Previously, only `a` and `br` tags were allowed in the `value` table cell for each field included in the HTML file generated when a user is exporting their personal data. Instead of relying on a hardcoded list of allowed tags, the `wp_kses()` call in `wp_privacy_generate_personal_data_export_group_html()` will now fallback to the default list of allowed tags (which includes `i`, `strong`, `em`, and other basic HTML formatting tags).

Also, a new context of `personal_data_export` will now be passed to the `wp_kses()` call. As a result, the list of HTML tags and attributes allowed in the export file can now be filtered using the `wp_kses_allowed_html` filter and checking for the `personal_data_export` context.

Fixes #44044.
Props tz-media, desrosj, pento, birgire, garrett-eclipse.
Built from https://develop.svn.wordpress.org/trunk@44824


git-svn-id: http://core.svn.wordpress.org/trunk@44656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-08 22:05:53 +00:00
Gary Pendergast
dcdfd7f412 Docs: Fix the last handful of incorrect @since 5.0.0 docblock tags.
Props peterwilsoncc.
Fixes #45543.


Built from https://develop.svn.wordpress.org/trunk@44635


git-svn-id: http://core.svn.wordpress.org/trunk@44466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:46:50 +00:00
Gary Pendergast
56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


Built from https://develop.svn.wordpress.org/trunk@43571


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast
8244397ffb Coding Standards: Prepare for upgrading WPCS to 1.0.0.
In order to get the best result when running `phpcbf` across the codebase, there are some manual tweaks we need to make.

These fall into three categories:
- Fixing incorrectly indented code which has flow-on effects when auto-fixing.
- Tweaking the layout of inline PHP inside HTML tags.
- Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.


Built from https://develop.svn.wordpress.org/trunk@43569


git-svn-id: http://core.svn.wordpress.org/trunk@43398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-15 06:22:26 +00:00
Sergey Biryukov
08af3900c3 Privacy: Ensure the user request email is sent in the requested user's locale (or the site's default locale if they are not a registered user) when the administrator creating the request uses a different locale.
Props desrosj, Chouby, iandunn, lbenicio, birgire, earnjam, swissspidy, garrett-eclipse.
Fixes #43985.
Built from https://develop.svn.wordpress.org/trunk@43568


git-svn-id: http://core.svn.wordpress.org/trunk@43397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-13 16:32:27 +00:00
Sergey Biryukov
76e821e647 I18N: Separate two "About" strings with different context.
Props desrosj, XpertOne, Nao.
Fixes #44139.
Built from https://develop.svn.wordpress.org/trunk@43527


git-svn-id: http://core.svn.wordpress.org/trunk@43356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 15:04:25 +00:00
Aaron Jorbin
691dc59ad3 Privacy: Silence is golden and invisible.
"Be more discrete." declared matt in [3155], and since then, "Silence is Golden" has been the calling card of placeholder index files. Historically, these have been php files, but [43012] changed that and added index.html files for privacy export generated folders.

The php silence files produce no visible content. This adds consistency with these new html files in that there will be no visible content. Silence will fall when the question is asked.

Fixes #44195.
Props audrasjb, rafsuntaskin, Ov3rfly, johnbillion, pento


Built from https://develop.svn.wordpress.org/trunk@43446


git-svn-id: http://core.svn.wordpress.org/trunk@43273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-15 23:39:27 +00:00
Felix Arntz
9768bde3c4 Privacy: Fix a further inconsistency of site name and URL usage in notification emails.
This is a follow-up to [43388].

Props desrosj.
Fixes #44396.

Built from https://develop.svn.wordpress.org/trunk@43435


git-svn-id: http://core.svn.wordpress.org/trunk@43262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-08 13:55:28 +00:00
Sergey Biryukov
33c708feca Privacy: Remove unnecessary This email has been sent to ###EMAIL### from privacy emails.
The line was copied from the emails that get sent when an email address changes, without considering if it made sense in the new context.

Props iandunn, ianbelanger, desrosj.
Fixes #44030.
Built from https://develop.svn.wordpress.org/trunk@43353


git-svn-id: http://core.svn.wordpress.org/trunk@43181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:32:48 +00:00
Sergey Biryukov
b4320bcd8f Docs: Add missing documentation and duplicate hook references for wp_privacy_personal_data_export_file, wp_privacy_personal_data_exporters, and wp_privacy_personal_data_erasers hooks.
Props birgire.
See #44125.
Built from https://develop.svn.wordpress.org/trunk@43303


git-svn-id: http://core.svn.wordpress.org/trunk@43132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-21 13:03:21 +00:00
Sergey Biryukov
35f94eb211 Privacy: Correct the error check when creating an export folder in wp_privacy_generate_personal_data_export_file().
`wp_mkdir_p()` returns `false` on error, not a `WP_Error` object.

Props birgire.
Fixes #44158.
Built from https://develop.svn.wordpress.org/trunk@43299


git-svn-id: http://core.svn.wordpress.org/trunk@43128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-21 11:59:24 +00:00
iandunn
fdd5b8dacd Privacy: Rename exports folder to avoid deleting other files.
Previously, personal data exports were stored in `wp-content/uploads/exports`, which is generic enough that it's likely there are existing folders with that name, either created by plugins or manually by administrators. If that folder were reused by Core, then `wp_privacy_delete_old_export_files()` would delete all of the existing files inside it, which is almost certainly not what the site owner wants or expects.

To avoid that, the folder is being renamed to include a specific reference to Core, and a more verbose description of its purpose. With those factored in, it's very unlikely that there will be any conflicts with existing folders.

The `wp_privacy_exports_dir()` and `wp_privacy_exports_url()` functions were introduced to provide a canonical source for the location, and the `wp_privacy_exports_dir` and `wp_privacy_exports_url` filters were introduced to allow plugins to customize it.

Props johnjamesjacoby, allendav.
Fixes #44091.

Built from https://develop.svn.wordpress.org/trunk@43284


git-svn-id: http://core.svn.wordpress.org/trunk@43113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 20:22:20 +00:00
Sergey Biryukov
0a9de1ef2e Privacy: Normalize file paths in wp_privacy_generate_personal_data_export_file() to make sure Windows paths don't have their backslashes stripped.
Props xkon, pmbaldha.
Fixes #43908.
Built from https://develop.svn.wordpress.org/trunk@43234


git-svn-id: http://core.svn.wordpress.org/trunk@43063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 21:11:23 +00:00
Sergey Biryukov
760ab78ff9 Privacy: Pass export request ID to wp_privacy_personal_data_export_file_created filter.
Props thomasplevy.
Fixes #44031.
Built from https://develop.svn.wordpress.org/trunk@43208


git-svn-id: http://core.svn.wordpress.org/trunk@43037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-09 23:18:22 +00:00
iandunn
798e3dc84d Privacy: Reuse existing archive filenames to maintain URLs.
Whenever an admin initiates a download or email of a personal data export, a fresh copy of the file is generated. Previously, a new filename was used each time, which could lead to situations where a URL that was emailed to a data subject is broken.

That can be avoided by reusing the same filename when building fresh archives.

Props desrosj, tz-media, allendav.
Fixes #43905.

Built from https://develop.svn.wordpress.org/trunk@43180


git-svn-id: http://core.svn.wordpress.org/trunk@43009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-08 00:52:21 +00:00
iandunn
3d4c461e50 Privacy: Store plugin callbacks in associative array for flexibility.
The personal data export and erasure tools allow plugins to register their own callbacks, in order to add additional data to the export and erasure processes. Previously, these were registered without specifying a constant identifier in the array of callbacks. Using mutable integers makes it difficult for plugins to modify the callbacks of other plugins, though.

Using associative array keys instead provides a covenient and reliable way to identify and interact with another plugin's callbacks.

Props desrosj, allendav, ocean90.
Fixes #43931.

Built from https://develop.svn.wordpress.org/trunk@43154


git-svn-id: http://core.svn.wordpress.org/trunk@42983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 19:28:21 +00:00
Andrew Ozz
3a43a64c20 Privacy: fix inconsistencies in new strings.
Props audrasjb.
Fixes #43925.
Built from https://develop.svn.wordpress.org/trunk@43118


git-svn-id: http://core.svn.wordpress.org/trunk@42947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 18:42:21 +00:00
Sergey Biryukov
eca2bf8545 I18N: Correct translator comment in wp_privacy_generate_personal_data_export_file().
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43089


git-svn-id: http://core.svn.wordpress.org/trunk@42918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:52:22 +00:00
Andrew Ozz
c77a8ed2fc Privacy: add attachments to the personal data export file.
Props allendav.
See #43883.
Built from https://develop.svn.wordpress.org/trunk@43054


git-svn-id: http://core.svn.wordpress.org/trunk@42883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 13:45:21 +00:00
iandunn
9abc0fe73e Privacy: Add wp_privacy_personal_data_export_file_created filter.
This runs immediately after the data export file has been successfully created, allowing plugins to introduce some workflow customizations. For example, a plugin could password-protect the export file, for peace of mind, even though the CSPRN in the filename makes brute force attacks nearly impossible.

See #43546.

Built from https://develop.svn.wordpress.org/trunk@43047


git-svn-id: http://core.svn.wordpress.org/trunk@42876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:04:22 +00:00
iandunn
23bf0c7535 Privacy: Add cron to delete expired export files to protect privacy.
The primary means of protecting the files is the CSPRN appended to the filename, but there is no reason to keep the files after the data subject has downloaded them, so deleting them provides an additional layer of protection. Previously this was done from `wp_privacy_generate_personal_data_export_file()`, but that does not guarantee that it will be run regularly, and on smaller sites that could result in export files being exposed for much longer than necessary.

`wp_privacy_delete_old_export_files()` was moved to a front end file, so that it can be called from `cron.php`.

This introduces the `wp_privacy_export_expiration` filter, which allows plugins to customize how long the exports are kept before being deleted.

`index.html` was added to the `$exclusions` parameter of `list_files()` to make sure that it isn't deleted. If it were, then poorly-configured servers would allow the directory to be traversed, exposing all of the exported files.

Props iandunn, desrosj.
See #43546.

Built from https://develop.svn.wordpress.org/trunk@43046


git-svn-id: http://core.svn.wordpress.org/trunk@42875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 20:09:23 +00:00
iandunn
5b4aa26436 Privacy: Use a CSPRNG in export filenames for more security.
`rand()` is deterministic and therefore offers much less protection in this context. `wp_generate_password()` is a convenient wrapper around `wp_rand()`, which uses `random_int()` to generate cryptographically-secure psuedorandom numbers.

See #43546.

Built from https://develop.svn.wordpress.org/trunk@43045


git-svn-id: http://core.svn.wordpress.org/trunk@42874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 18:53:25 +00:00
Andrew Ozz
b044b4053e Privacy: add means to export personal data by username or email address. Generate a zipped export file containing all data. First run.
Props allendav.
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43012


git-svn-id: http://core.svn.wordpress.org/trunk@42841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 19:54:21 +00:00
Sergey Biryukov
3957635dfb I18N: Correct placeholder references in a translator comment in wp_print_file_editor_templates().
Props afercia.
See #43523.
Built from https://develop.svn.wordpress.org/trunk@42983


git-svn-id: http://core.svn.wordpress.org/trunk@42812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 18:36:24 +00:00
John Blackbourn
c9b07e6411 Docs: Standardise and correct documentation relating to parameters which accept plugin names.
See #42505

Built from https://develop.svn.wordpress.org/trunk@42787


git-svn-id: http://core.svn.wordpress.org/trunk@42617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 21:50:31 +00:00
Sergey Biryukov
58592b64dc Docs: Use consistent description for $wp_filesystem global.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42777


git-svn-id: http://core.svn.wordpress.org/trunk@42607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:58:30 +00:00
Sergey Biryukov
179bec1306 Docs: Clarify return values and improve DocBlock formatting for verify_file_md5(), unzip_file(), _unzip_file_ziparchive(), _unzip_file_pclzip(), copy_dir(), WP_Filesystem().
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42776


git-svn-id: http://core.svn.wordpress.org/trunk@42606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:43:30 +00:00
Sergey Biryukov
3c8ae81018 Docs: Clarify download_url() return value, improve DocBlock formatting.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42775


git-svn-id: http://core.svn.wordpress.org/trunk@42605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 19:50:31 +00:00
Sergey Biryukov
86c3c7e1c9 Filesystem API: Allow download_url() to return the response code and body on error as an additional WP_Error object data.
The error response body size is limited to 1 KB by default to avoid taking up too much memory. The size can be increased using `download_url_error_max_body_size` filter.

Props soulseekah, campusboy1987, mihdan, SergeyBiryukov.
Fixes #43329.
Built from https://develop.svn.wordpress.org/trunk@42773


git-svn-id: http://core.svn.wordpress.org/trunk@42603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 17:14:31 +00:00
Sergey Biryukov
0e802a627d General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.
Built from https://develop.svn.wordpress.org/trunk@42761


git-svn-id: http://core.svn.wordpress.org/trunk@42591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-27 02:31:31 +00:00
Peter Wilson
e6ccdf161f General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.


Built from https://develop.svn.wordpress.org/trunk@42719


git-svn-id: http://core.svn.wordpress.org/trunk@42547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 02:13:32 +00:00
John Blackbourn
fc6ba86b80 Docs: First pass at switching some array parameter documentation to typed notation.
Props janak007

See #41756

Built from https://develop.svn.wordpress.org/trunk@42679


git-svn-id: http://core.svn.wordpress.org/trunk@42507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:26:31 +00:00
John Blackbourn
91464bce65 Docs: Add missing code formatting to various @since entries.
See #42505

Built from https://develop.svn.wordpress.org/trunk@42678


git-svn-id: http://core.svn.wordpress.org/trunk@42506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 16:55:31 +00:00
Peter Wilson
0d39b35c11 General: Replace Cheatin’ uh? with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.


Built from https://develop.svn.wordpress.org/trunk@42648


git-svn-id: http://core.svn.wordpress.org/trunk@42477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 02:30:34 +00:00
Sergey Biryukov
0eb2581c67 Media: In _wp_handle_upload(), check if the file was properly uploaded before checking its size.
Props achbed, dglingren.
Fixes #39522.
Built from https://develop.svn.wordpress.org/trunk@42525


git-svn-id: http://core.svn.wordpress.org/trunk@42354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 07:16:30 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Dion Hulse
271e08a26e Theme Editior: Base the nonce on a simpler combination of fields, for easier debugging & reading.
See #42609.
Fixes #42705.

Built from https://develop.svn.wordpress.org/trunk@42246


git-svn-id: http://core.svn.wordpress.org/trunk@42075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:44:47 +00:00