Making WordPress.org

Changeset 10976


Ignore:
Timestamp:
05/14/2021 02:10:01 AM (3 years ago)
Author:
dd32
Message:

Login: Correctly identify requests to /wp-signup.php and redirect those to the registration screen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/wporg-sso/wp-plugin.php

    r10905 r10976  
    247247            add_filter( 'register_url', array( $this, 'register_url' ), 20 );
    248248
    249             if ( preg_match( '!/wp-signup\.php$!', $this->script ) ) {
     249            if ( preg_match( '!/wp-signup\.php$!', $_SERVER['REQUEST_URI'] ) ) {
     250                // Note: wp-signup.php is not a physical file, and so it's matched on it's request uri.
    250251                // If we're on any WP signup screen, redirect to the SSO host one,respecting the user's redirect_to request
    251252                $this->_safe_redirect( add_query_arg( 'redirect_to', urlencode( $redirect_req ), $this->sso_signup_url ), 301 );
Note: See TracChangeset for help on using the changeset viewer.