WordPress.org

Making WordPress.org

Changeset 4413


Ignore:
Timestamp:
11/24/16 04:16:57 (13 months ago)
Author:
nacin
Message:

SSO: Consider the referer when doing a login redirect.

fixes #2244.

File:
1 edited

Legend:

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

    r4353 r4413  
    256256            if ( ! empty( $_GET['redirect_to'] ) ) { 
    257257                $defaults['redirect'] = $_GET['redirect_to']; // always ultimately checked for safety at redir time 
     258            } elseif ( $referer = wp_get_referer() ) { 
     259                $defaults['redirect'] = $referer; 
    258260            } 
    259261            return $defaults; 
Note: See TracChangeset for help on using the changeset viewer.