Opened 13 months ago
Closed 13 months ago
#63434 closed defect (bug) (fixed)
Warning logged if wp-login.php action is given as an array
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | 6.8 |
| Component: | Login and Registration | Keywords: | has-patch |
| Focuses: | Cc: |
Description
An attacker has caused a warning to be logged by providing an array for the login action
PHP Warning: Array to string conversion in /var/www/html/wp-login.php on line 509
To reproduce
curl -F user_login=x "http://localhost/wp-login.php?action[]=lostpassword"
Suggested patch
--- wp-login.php.dist 2025-05-12 09:44:24.926044462 +0000 +++ wp-login.php 2025-05-12 09:51:03.969310149 +0000 @@ -480,5 +480,5 @@ */ -$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login'; +$action = ( isset( $_REQUEST['action'] ) && is_string ( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : 'login'; $errors = new WP_Error();
Change History (3)
Note: See
TracTickets for help on using
tickets.
In 60239: