Changeset 64348
- Timestamp:
- 10/14/2026 09:54:00 PM (4 weeks ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
-
src/wp-includes/canonical.php (modified) (1 diff)
-
tests/phpunit/tests/canonical/changePassword.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r64300 r64348 1079 1079 exit; 1080 1080 } 1081 1082 /** 1083 * Filters the well-known change password URL (/.well-known/change-password). 1084 * 1085 * By default visiting the well-known change password URL will redirect to 1086 * the user's profile page when requested by a browser or password manager. 1087 * 1088 * Sites with a custom URL structure for modifying the passwords can modify 1089 * the destination with this filter. 1090 * 1091 * The resulting URL is redirected using {@see wp_safe_redirect}, if the 1092 * filtered URL is on an external host, that host will need to be included 1093 * as an allowed host via the {@see 'allowed_redirect_hosts'} filter. 1094 * 1095 * @since 7.2.0 1096 * 1097 * @param string $change_password_url The URL to redirect to. Default is the user profile page. 1098 */ 1099 $change_password_url = apply_filters( 'wp_change_password_url', admin_url( 'profile.php' ) ); 1100 1101 /* 1102 * The well-known change-password URL is always at the root of the origin 1103 * per the spec (https://w3c.github.io/webappsec-change-password-url/), so 1104 * only the root-relative path is matched here, regardless of whether 1105 * WordPress is installed in a subdirectory. 1106 */ 1107 if ( 1108 '/.well-known/change-password' === untrailingslashit( $_SERVER['REQUEST_URI'] ) 1109 && $change_password_url 1110 && wp_safe_redirect( $change_password_url ) 1111 ) { 1112 exit; 1113 } 1081 1114 }
Note:
See TracChangeset
for help on using the changeset viewer.