WordPress.org

Making WordPress.org

Changeset 4413


Ignore:
Timestamp:
11/24/2016 04:16:57 AM (20 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.