Opened 3 years ago
Closed 3 years ago
#8538 closed defect (bug) (fixed)
Error message when clicking in cancelled email verification link
Reported by: | nunks | Owned by: | imath |
---|---|---|---|
Milestone: | 9.1.0 | Priority: | normal |
Severity: | normal | Version: | 9.0.0 |
Component: | Settings | Keywords: | has-patch 2nd-opinion |
Cc: |
Description
Error message when clicking in cancelled email verification link:
BuddyPress version: 9.0.0
Wordpress version: 5.8
Steps to reproduce:
- Change e-mail address in profile page
- Cancel e-mail change in profile page
- Follow (now invalid) verification link sent to user email as confirmation
Error returned:
Warning: Uninitialized string offset 0 in /srv/http/bp/wp-content/plugins/buddypress/bp-settings/actions/general.php on line 258 Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /srv/http/bp/wp-content/plugins/buddypress/bp-settings/actions/general.php:258 Stack trace: #0 /srv/http/bp/wp-includes/class-wp-hook.php(303): bp_settings_verify_email_change() #1 /srv/http/bp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #2 /srv/http/bp/wp-includes/plugin.php(470): WP_Hook->do_action() #3 /srv/http/bp/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(368): do_action() #4 /srv/http/bp/wp-includes/class-wp-hook.php(303): bp_actions() #5 /srv/http/bp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #6 /srv/http/bp/wp-includes/plugin.php(470): WP_Hook->do_action() #7 /srv/http/bp/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(445): do_action() #8 /srv/http/bp/wp-includes/class-wp-hook.php(303): bp_template_redirect() #9 /srv/http/bp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #10 /srv/http/bp/wp-includes/plugin.php(470): WP_Hook->do_action() #11 /srv/http/bp/wp-includes/template-loader.php(13): do_action() #12 /srv/http/bp/wp-blog-header.php(19): require_once('/srv/http/bp/wp...') #13 /srv/http/bp/index.php(17): require('/srv/http/bp/wp...') #14 {main} thrown in /srv/http/bp/wp-content/plugins/buddypress/bp-settings/actions/general.php on line 258
The error occur even when BuddyPress is the only active plugin in installation.
Expected behavior: Maybe send user back to profile page? An action hook would be a nice extra...
Test installation run in: ArchLinux, Apache 2.4.48, PHP 8.0.8
Attachments (1)
Change History (5)
#2
@
3 years ago
- Keywords has-patch 2nd-opinion added; needs-patch removed
8538.patch should fix the issue. It includes hooks to bypass the redirect when this case happens, when the email has been changed and when the email change has been dismissed.
About the feedback message output to the user who followed an invalid verification link, as english is not my native language, don't hesitate to improve it:
"There was a problem verifying your new email address. If you haven’t dismissed the pending email change, please request a new email update."
Thanks for your report. I'll look at it asap.