You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shib plugin not targeting the current site's domain name in Multisite setup. #33
In a multi-site setup the plugin seems to always use the main blog (#1) as the selected site. This causes problems in my setup (we use domain names for subsites) and always redirects users logging in to the admin section of the main site.The issue seems to stem from the use of $GLOBALS[‘current_site’]->blog_id in the shibboleth_session_initiator_url function. This has been happening for quite some time now (Since at least version 1.6) and I had to create my own function (See below) to get around the problem. I was wondering if a more permanent resolution could be put in place. Thank you.
changed the title [-]Shib plugin not targeting the current sites domain in Multisite setup.[/-][+]Shib plugin not targeting the current site's domain name in Multisite setup.[/+]on Feb 7, 2018
@jrchamp, I can confirm that works in my multisite setup (single-network multi-site). Single site will be easy to test but I have never set up a multi-network setup. I wouldn't mind doing so for the purpose of getting this fixed but it will take me some time to setup.
Activity
[-]Shib plugin not targeting the current sites domain in Multisite setup.[/-][+]Shib plugin not targeting the current site's domain name in Multisite setup.[/+]jrchamp commentedon Feb 7, 2018
I've seen this behavior recently and a similar solution was brought up in the past, but it sent me into in a redirect loop: https://github.com/mitcho/shibboleth/pull/15/files
I'm really hoping we can get this solved and soon. We're definitely going to look at this soon ourselves.
Now, because there can be multiple networks (see https://developer.wordpress.org/reference/functions/get_main_site_id/ ), I'm hoping to not hard-code the blog id 1. We might be able to use the
$GLOBALS['current_site']->site_idin place, resulting in:Testing is definitely needed to make sure this works with single-network multi-site, multi-network multi-site and traditional single-site.
themantimeforgot commentedon Feb 7, 2018
@jrchamp, I can confirm that works in my multisite setup (single-network multi-site). Single site will be easy to test but I have never set up a multi-network setup. I wouldn't mind doing so for the purpose of getting this fixed but it will take me some time to setup.
Merge pull request #35 from jrchamp/fix_login_url