Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: str_contains() argument must be of type string, array given in wp-login.php #34

Open
Krinkle opened this issue Sep 16, 2023 · 1 comment
Assignees
Labels
Service: Doc sites WordPress doc sites. Type: Problem Something isn't working

Comments

@Krinkle
Copy link
Member

Krinkle commented Sep 16, 2023

Various bots and crawlers are producing entries like the following in wp-05:/var/log/php8.2-fpm.log:

[15-Sep-2023 15:02:17] WARNING: [pool www] child 2355747 said into stderr:
  PHP Fatal error:  Uncaught TypeError: str_contains(): Argument #1 ($haystack) must be of type string, array given
  in /srv/wordpress/sites/api_jquery_com/wp-login.php:1365
  Stack trace:
  #0 /srv/wordpress/sites/api_jquery_com/wp-login.php(1365): str_contains()
  #1 {main}
  thrown in /srv/wordpress/sites/api_jquery_com/wp-login.php on line 1365

Seems to be an upstream issue where a $_GET or $_REQUEST key is checked for existence but not for type, thus prone to misuse when crafting query parameters in the array-form that PHP supports.

https://github.com/WordPress/wordpress-develop/blob/6.3.1/src/wp-login.php#L1267-L1365

@Krinkle Krinkle added Type: Problem Something isn't working Service: Doc sites WordPress doc sites. labels Sep 16, 2023
@Krinkle Krinkle self-assigned this Sep 16, 2023
@Krinkle
Copy link
Member Author

Krinkle commented Sep 16, 2023

Filed upstream ticket at https://core.trac.wordpress.org/ticket/59373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service: Doc sites WordPress doc sites. Type: Problem Something isn't working
Development

No branches or pull requests

1 participant