humanmade / wp-simple-saml

WordPress Simple SAML plugin
GNU General Public License v3.0
100 stars 32 forks source link

Infinite loop for sub-directory sites #86

Open clonge opened 1 month ago

clonge commented 1 month ago

When trying to log into a sub-directory site like:

https://www.example.com/subsite/wp-login.php?redirect_to=https://www.exmaple.com/subsite/

I'm getting an infinite loop. The base url is submitting to itself. That is the cross site form on www.example.com/sso/verify is submitting to www.example.com/sso/verify instead of submitting to www.example.com/subsite/sso/verify. The $sso_url here is being set incorrectly for sub-directory sites.

clonge commented 1 month ago

I've fixed the issue in PR #87 by using the custom function get_blog_id to grab the site associated with the url.