Fix an issue where users could save a password with only spaces, or spaces at the beginning or end of their password, preventing them from logging in.
Props ronakganatra, 1naveengiri, ajensen, oolleegg55, bookdude13, nrqsnchz, aristath.
Fixes#42766.
git-svn-id: https://develop.svn.wordpress.org/trunk@49118 602fd350-edb4-49c9-b593-d223f7449a82
This brings some consistency to the YouTube and Vimeo URLs used for tests:
* For YouTube, use the video of WordPress 5.0 release.
* For Vimeo, use one of the official test videos.
Props garrett-eclipse, dd32.
Fixes#51487. See #meta5467.
git-svn-id: https://develop.svn.wordpress.org/trunk@49117 602fd350-edb4-49c9-b593-d223f7449a82
This allows multiple errors to be instantiated independently but collected into one without having to manually combine their properties.
Props rmccue, dlh, TimothyBlynJacobs
Fixes#38777
git-svn-id: https://develop.svn.wordpress.org/trunk@49115 602fd350-edb4-49c9-b593-d223f7449a82
This replaces the instances of `$priority` with `$position`, to match the actual parameter name and avoid confusion.
Follow-up to [46197].
See #51344, #39776.
git-svn-id: https://develop.svn.wordpress.org/trunk@49112 602fd350-edb4-49c9-b593-d223f7449a82
In WordPress 4.4 the REST API was first introduced. A few releases later in WordPress 4.7, the Content API endpoints were added, paving the way for Gutenberg and countless in-site experiences. In the intervening years, numerous plugins have built on top of the REST API. Many developers shared a common frustration, the lack of external authentication to the REST API.
This commit introduces Application Passwords to allow users to connect to external applications to their WordPress website. Users can generate individual passwords for each application, allowing for easy revocation and activity monitoring. An authorization flow is introduced to make the connection flow simple for users and application developers.
Application Passwords uses Basic Authentication, and by default is only available over an SSL connection.
Props georgestephanis, kasparsd, timothyblynjacobs, afercia, akkspro, andraganescu, arippberger, aristath, austyfrosty, ayesh, batmoo, bradyvercher, brianhenryie, helen, ipstenu, jeffmatson, jeffpaul, joostdevalk, joshlevinson, kadamwhite, kjbenk, koke, michael-arestad, Otto42, pekz0r, salzano, spacedmonkey, valendesigns.
Fixes#42790.
git-svn-id: https://develop.svn.wordpress.org/trunk@49109 602fd350-edb4-49c9-b593-d223f7449a82
This allows for clients to search the available terms via the `/wp/v2/search` endpoint by using a `type=term` query parameter.
Fixes#51458.
Props andraganescu, zieladam, noisysocks, TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@49103 602fd350-edb4-49c9-b593-d223f7449a82
- Add jquery-migrate.js v.3.3.1 to core and load it in debug mode when `SCRIPT_DEBUG` is true.
- Add jquery.min.js, update jquery.js to 3.5.1 non-minified. This should help when debugging.
- Rebuild jQuery UI 1.12.1 and add it to core.
- Fix/adjust tests to match the above changes.
See #50564.
git-svn-id: https://develop.svn.wordpress.org/trunk@49101 602fd350-edb4-49c9-b593-d223f7449a82
Primarily this adds "user privacy" to the strings for privacy requests, so they are more easily distinguished from other system actions within logs.
Props garrett-eclipse, carike, birgire.
Fixes#51351.
git-svn-id: https://develop.svn.wordpress.org/trunk@49090 602fd350-edb4-49c9-b593-d223f7449a82
This makes `wp_get_attachment_metadata()` run significantly faster. See ticket for benchmarking.
Props Tkama, donmhico.
Fixes#50679.
git-svn-id: https://develop.svn.wordpress.org/trunk@49084 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
These tests rely on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045], [49050], [49052].
See #50639, #50640.
git-svn-id: https://develop.svn.wordpress.org/trunk@49069 602fd350-edb4-49c9-b593-d223f7449a82
This adds support for the secure and ipv6 variants of the already allowed irc protocol.
Props arealnobrainer, markparnell, ctmartin.
git-svn-id: https://develop.svn.wordpress.org/trunk@49055 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
This test relies on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045], [49050].
See #50639, #50640.
git-svn-id: https://develop.svn.wordpress.org/trunk@49052 602fd350-edb4-49c9-b593-d223f7449a82
`author_avatar_urls` should be present in the comment data array keys, not values.
The test only passed accidentally due to `assertContains()` not performing a strict type check.
See #38266, #50913.
git-svn-id: https://develop.svn.wordpress.org/trunk@49051 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
This test relies on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045].
See #50639, #50640.
git-svn-id: https://develop.svn.wordpress.org/trunk@49050 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
These tests rely on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045].
See #50639, #50640.
git-svn-id: https://develop.svn.wordpress.org/trunk@49047 602fd350-edb4-49c9-b593-d223f7449a82
If the sizes data could not be retrieved, the controller returns an empty object instead of an array.
This makes sure that the value is in fact an array before proceeding, and outputs a proper message in case of failure, instead of an obscure PHP error further in the test.
Follow-up to [49044].
See #50913, #51393.
git-svn-id: https://develop.svn.wordpress.org/trunk@49046 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message if the requirement is not met, instead of an obscure PHP error further in the test.
These tests rely on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025].
See #50639, #50640.
git-svn-id: https://develop.svn.wordpress.org/trunk@49045 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message in case of failure, instead of an obscure PHP error further in the test.
Props TimothyBlynJacobs.
See #50913, #51393.
git-svn-id: https://develop.svn.wordpress.org/trunk@49044 602fd350-edb4-49c9-b593-d223f7449a82
* Replace the `Match` interface with `ParametersMatch`, to avoid parse errors due to `match` being a reserved keyword in PHP 8.
* Replace `ReflectionParameter::getClass()` usage, which is deprecated in PHP 8.
This allows tests relying on the `getMockForAbstractClass()` and `getMockBuilder()` methods to run again on PHP 8.
When the test suite is updated for compatibility with PHPUnit 9.x, these overrides can be removed.
Follow-up to [48972].
See #50913, #50902.
git-svn-id: https://develop.svn.wordpress.org/trunk@49037 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a few PHP notices if the `include_selected` parameter was specified and a non-existing user ID was passed.
Props campusboy1987.
Fixes#51370.
git-svn-id: https://develop.svn.wordpress.org/trunk@49036 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message in case of failure, instead of an obscure PHP error further in the test.
See #50913.
git-svn-id: https://develop.svn.wordpress.org/trunk@49032 602fd350-edb4-49c9-b593-d223f7449a82
This outputs a proper message if the requirement is not met, instead of an obscure PHP error further in the test.
See #50639, #50640.
git-svn-id: https://develop.svn.wordpress.org/trunk@49010 602fd350-edb4-49c9-b593-d223f7449a82
The explicit message brings some consistency with other image editor tests, specifically the ones using the `WP_Image_UnitTestCase` class.
Previously, the tests were marked as "risky" in that scenario, due to performing no assertions.
See #50639, #50640.
git-svn-id: https://develop.svn.wordpress.org/trunk@49009 602fd350-edb4-49c9-b593-d223f7449a82
The tests ensure that `rest_sanitize_value_from_schema()` and `rest_validate_value_from_schema()` throw an "undefined offset" notice when the required `type` schema keyword is not passed.
In PHP 8, that notice is now a warning, so the tests need to be adjusted accordingly.
Follow-up to [48300], [48993].
See #50913.
git-svn-id: https://develop.svn.wordpress.org/trunk@49007 602fd350-edb4-49c9-b593-d223f7449a82
Transitioning posts from `auto-draft` to `publish` via `wp_publish_post()` could result in published posts without the default category or custom taxonomy default terms.
Props frank-klein, TimothyBlynJacobs, peterwilsoncc.
Fixes#51292.
git-svn-id: https://develop.svn.wordpress.org/trunk@49000 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the test had to use an older pattern for catching the generic `Exception` exceptions for compatibility with PHPUnit 3.6 on PHP 5.2.
Now that WordPress supports PHPUnit 5.4 as the minimum version, the `expectException()` method can be used directly.
Follow-up to [41725], [41730].
See #51344.
git-svn-id: https://develop.svn.wordpress.org/trunk@48999 602fd350-edb4-49c9-b593-d223f7449a82
The test ensures that `WP_Locale::get_weekday()` throws an "undefined offset" notice when called with an incorrect `$weekday_number` parameter.
In PHP 8, that notice is now a warning, so the test needs to be adjusted accordingly.
See #50913.
git-svn-id: https://develop.svn.wordpress.org/trunk@48993 602fd350-edb4-49c9-b593-d223f7449a82