[wp-trac] [WordPress Trac] #53658: Display a user-facing message when the application passwords functionality is not available

WordPress Trac noreply at wordpress.org
Tue Dec 21 02:43:32 UTC 2021


#53658: Display a user-facing message when the application passwords functionality
is not available
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:
                                                 |  johnbillion
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.9
Component:  Application Passwords                |     Version:  5.6
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests commit                                   |  administration
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52398" 52398]:
 {{{
 #!CommitTicketReference repository="" revision="52398"
 Application Passwords: Show HTTPS required message without filtering when
 not enabled or not in local environment.

 When `add_filter( 'wp_is_application_passwords_available',
 '__return_false' )` exists, HTTPS requirement message is shown even if
 HTTPS is enabled on the site. This happens because
 `wp_is_application_passwords_available_for_user()` first invokes
 `wp_is_application_passwords_available()` which is filterable. The
 situation could happen if the
 `'wp_is_application_passwords_available_for_user'` filter returns `false`.

 To fix this, the check for HTTPS (or if in a 'local' environment) is moved
 to a new function called `wp_is_application_passwords_supported()`. Then
 the return from this function is used as an OR condition for the
 Application Passwords section and for displaying the HTTPS required
 message.

 Tests are included for both `wp_is_application_passwords_supported()` and
 `wp_is_application_passwords_available()`.

 Follow-up to [51980], [51988].

 Props davidbinda, SergeyBiryukov, ocean90, felipeelia, costdev,
 hellofromTonya.
 Fixes #53658.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53658#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list