[buddypress-trac] [BuddyPress Trac] #7938: Using the same activation key results in wrong "Invalid activation key" error

buddypress-trac noreply at wordpress.org
Sun Apr 26 13:49:19 UTC 2020


#7938: Using the same activation key results in wrong "Invalid activation key"
error
---------------------------+-------------------------------------
 Reporter:  r-a-y          |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Contributions
Component:  Members        |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  needs-testing  |
---------------------------+-------------------------------------

Comment (by dsar):

 The original report is not about conflicting keys, it's about users trying
 to activate keys after they had already been activated. At the moment,
 that will result in an "Invalid activation key" message for the user.

 The code in bp-members-function.php, function bp_core_activate_signup()
 {{{#!php
                 if ( $signup->active ) {
                         if ( empty( $signup->domain ) ) {
                                 return new WP_Error( 'already_active', __(
 'The user is already active.', 'buddypress' ), $signup );
                         } else {
                                 return new WP_Error( 'already_active', __(
 'The site is already active.', 'buddypress' ), $signup );
                         }
                 }
 }}}

 will never run, as BP_Signup::get will never fetch non-activated keys from
 signups table, as it has this code in it:
 {{{#!php
                 $sql['where']   = array();
                 $sql['where'][] = "active = 0";
 }}}

 I'm not sure if just replacing
 {{{#!php
 $sql['where'][] = "active = 0";
 }}}
 with
 {{{#!php
 $sql['where'][] = "1 = 1";
 }}}

 would affect anything else, but it would fix this issue.

 Having looked back on the changes in these two files, I'm not seeing
 changes to this part of the code in at least the last 5-6 years, which
 makes me wonder if anything else might be depending on it?

 The issue with "Invalid activation key" error is easily reproduceable by
 just double clicking the Activate button for any new users.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7938#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list