michaelryanmcneill / shibboleth

Shibboleth plugin for WordPress
https://wordpress.org/plugins/shibboleth/
19 stars 11 forks source link

WordPress v5+ #58

Closed martinhaase closed 4 years ago

martinhaase commented 4 years ago

This Plugin's compliance is "tested up to WP4.9.3". We found it works with v5+ when doing a little modification to the central .htaccess file:

# commented for the following line, to ignore index.php AND Shibboleth.sso/* and from rewrite
# RewriteRule ^index\.php$ - [L]
RewriteRule ^index\.php|Shibboleth\.sso\/.*$ - [L,NC]

And of course, WP5 has more default groups which this Plugin still cannot serve.

jrchamp commented 4 years ago

Hi @martinhaase,

And of course, WP5 has more default groups which this Plugin still cannot serve.

Can you provide more information here? What default groups have been added in WP5?

The RewriteRule for Shibboleth.sso is not a WordPress v5 issue - it's been discussed before: https://github.com/michaelryanmcneill/shibboleth/issues/40#issuecomment-384405798

@michaelryanmcneill - is the Shibboleth RewriteRule something that should be added to the documentation?

martinhaase commented 4 years ago

Hi @jrchamp I see, in the Shibboleth plugin's role mapping page, the following roles, in this sequence:

jrchamp commented 4 years ago

It looks like those roles are probably coming from bbPress: https://codex.bbpress.org/getting-started/before-installing/bbpress-user-roles-and-capabilities/

Hope that helps!

michaelryanmcneill commented 4 years ago

@jrchamp I will add a stanza to the readme.txt about the rewrite issue!

christianhauff commented 4 years ago

I just got it running using wordpress 5.4.1 by adding the following on top of the .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule Shibboleth\.sso - [L]
</IfModule>

The line mentioned in the first comment did crash some other wordpress behavior.

martinhaase commented 4 years ago

Actually, since the main .htaccess file will be overwritten by seemingly at least some of the WordPress updates, it is best to put the exception directly in the Apache VHost:

<Location /Shibboleth.sso>
  Satisfy Any
  Allow from all
  RewriteEngine On
  RewriteRule ^/Shibboleth.sso.* - [L]
</Location>

In this case, no change is needed for the .htaccess file regarding Shibboleth anymore.