User login loops in WP 5.x multisite
-
I am still trying to figure out a fix for the issues we are having with with Shibboleth 2 doing infinite loop when ANY user logs in to the sites on the network. It does not appear to loop on the “main” site. But anything that is the “multisite” network, the loop happens, even with super-admin login.
Put in correct username password, it just loop through https://webauth.service.ohio-state.edu/idp/profile/SAML2/Redirect/SSO?execution=e3s1 until it eventually times out.
Any help is greatly appreciated!
Here are the files I thought might be helpful for you to review for me.
.htaccess file
RewriteEngine On# Force SSL
# I think this is doing the same thing as the next block
#RewriteEngine On
#RewriteCond %{HTTPS} ^off$ [NC]
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [L,R=301,NE,QSA]# Force HTTPS
RewriteCond %{SERVER_NAME} ^www\. [NC,OR]
RewriteCond %{HTTPS} ^off$ [NC]
RewriteCond %{SERVER_NAME} ^(www\.)?(.*) [NC]
RewriteRule ^/?(.*) https://%2/$1 [L,R=301,NE,QSA]# Allow Shib urls
RewriteCond %{REQUEST_URI} ^/Shibboleth.sso($|/)
RewriteRule . – [L]#Shib
AuthType shibboleth
ShibRequestSetting redirectToSSL 443
ShibRequestSetting requireSession 1
Require shib-session# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]# END WordPress
This might be completely messed up, but I tried to adjust code to work on PHP 7 and the new WordPress version.
shibboleth-mu.php
<?php// include regular Shibboleth plugin file
require_once dirname(__FILE__) . ‘/shibboleth/shibboleth.php’;function shibboleth_muplugins_loaded() {
add_filter(‘shibboleth_plugin_path’, function($p) {
echo($p);
return WPMU_PLUGIN_URL . “/shibboleth”;} );
}
add_action(‘muplugins_loaded’, ‘shibboleth_muplugins_loaded’);
?>
- The topic ‘User login loops in WP 5.x multisite’ is closed to new replies.