Making WordPress.org


Ignore:
Timestamp:
10/25/2024 02:40:52 AM (14 months ago)
Author:
dd32
Message:

Registrations: Improve performance of the approval UI by limiting some requests to exact or anchored matches.
Additionally re-use/cache/skip getting counts for some searches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php

    r14122 r14147  
    7474    $profile_key        = wp_generate_password( 24, false, false );
    7575    $hashed_profile_key = time() . ':' . wp_hash_password( $profile_key );
     76
     77    $source = $_COOKIE['wporg_came_from'] ?? '';
     78    if ( $source ) {
     79        $source = remove_query_arg( [ 'SAMLRequest', 'RelayState' ], $source );
     80    }
    7681
    7782    $pending_user = array(
     
    8489            'registration_ip'         => $_SERVER['REMOTE_ADDR'], // Spam & fraud control. Will be discarded after the account is created.
    8590            'registration_ip_country' => ( is_callable( 'WordPressdotorg\GeoIP\query' ) ? \WordPressdotorg\GeoIP\query( $_SERVER['REMOTE_ADDR'], 'country_short' ) : '' ),
    86             'source'                  => $_COOKIE['wporg_came_from'] ?? '',
     91            'source'                  => $source,
    8792        ),
    8893        'scores'              => array(
Note: See TracChangeset for help on using the changeset viewer.