Opened 3 years ago
Last modified 4 weeks ago
#57032 new defect (bug)
Percent sign in site title leads to signing up new users not working
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 6.0.3 |
| Component: | Login and Registration | Keywords: | |
| Focuses: | multisite | Cc: |
Description
When a web site title contains a percent sign, e.g.
Brand name - 100% organic
the process of signing up a new user in /wp-admin/user-new.php will fail with a fatal error, probably because the percent sign is interpreted as a placeholder by sprintf() in /wp-includes/ms-functions.php around line 1105:
Fatal error: Uncaught ArgumentCountError: 3 arguments are required, 2 given in
(...)/sites/wheaty_v3/htdocs/wp-includes/ms-functions.php:1105Stack
trace: #© (...)/htdocs/wp-includes/ms-functions.php(1105):
sprintf(' Hallo, Indu wurde..
, 'https://www.whe...#1
(...)/htdocs/wp-includes/class-wp-hook.php(307):
wpmu_signup_user_notification('(...)','(...)..
'36db891bc11cbbc..
, Array) #2
(...)/htdocs/wp-includes/class-wp-hook.php(331):
WP_Hook->apply_filters(",Array)#3(...)/htdocs/wp-
includes/plugin.php(476):WP_Hook->do_action(Array)#4
/(...)/htdocs/wp-includes/ms-functions.php(892):
do action('after_signup_us...,
'(...)', '(...)
'36db891bc11cbbc..., Array) #5
(...)/wheaty_v3/htdocs/wp-admin/user-new.php(226):
wpmu_signup_user('oliver2', 'technik@hansetr..
, Array) #6 {main} thrown in
/(...)/htdocs/wp-includes/ms-functions.php on line
1105
Presumably, the web site title needs to be escaped somewhere in the apply_filters() call.
Attachments (1)
Change History (6)
#3
in reply to:
↑ 2
@
3 years ago
Replying to kowsar89:
Works fine from my side(WP-v6.1, PHP-v7.4.30). Which PHP version you are using?
Huh! Strange.
PHP is 8.1.7.
I can definitely reproduce it (if I add the % in the site title, it breaks, if I remove it, it works).
But have lots of plugins and customizations running.
Will try to reproduce on a completely clean WP install if I can.
#4
@
3 years ago
- Keywords needs-testing added
Hey @pekkagaiser, thanks for your ticket. I have tried to reproduce as well in a multi-site environment with PHP version 8+. But, I didn't encounter any Fatal errors. Let us know if you can replicate this in a clean install or not. By then, would really appreciate any testing from other peeps.
#5
@
4 weeks ago
- Keywords needs-testing removed
Bug Reproduction Report
Environment
- WordPress: 6.9.1
- PHP: 8.3.30
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
- Browser: Firefox 147.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Email Log 2.62
- Test Reports 1.2.1
Steps taken
- Went to playground: https://playground.wordpress.net/?multisite=yes&networking=yes&login=yes&url=/wp-admin/network/settings.php
- Updated site title to - "My WordPress Website Sites - 100% Percent"
- Went to primary site option and updated site title to "My WordPress Website - 200% time"
- Created a user successfully from the Network Admin > Users.
- ❌ Error condition does not occur.
Expected result
- Creating user fails with fatal error.
Works fine from my side(WP-v6.1, PHP-v7.4.30). Which PHP version you are using?