Changeset 3457488
- Timestamp:
- 02/09/2026 09:40:55 PM (5 weeks ago)
- File:
-
- 1 edited
-
vectoron/trunk/includes/ajax-proxy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
vectoron/trunk/includes/ajax-proxy.php
r3457468 r3457488 57 57 } 58 58 59 // Enable Application Passwords for this AJAX request. 60 // By default, wp_authenticate_application_password() only works for REST API 61 // and XML-RPC requests (checks REST_REQUEST/XMLRPC_REQUEST constants). 62 // Since we're routing REST calls through admin-ajax.php, we need to tell 63 // WordPress this is a legitimate API request that should accept app passwords. 64 add_filter( 'application_password_is_api_request', '__return_true' ); 65 59 66 $user = wp_authenticate( $credentials['username'], $credentials['password'] ); 60 67 // Clear password from memory immediately 61 68 unset( $credentials['password'] ); 69 70 // Remove the filter to avoid side effects on subsequent requests in the same process 71 remove_filter( 'application_password_is_api_request', '__return_true' ); 62 72 63 73 if ( is_wp_error( $user ) ) {
Note: See TracChangeset
for help on using the changeset viewer.