-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAML url doesn't seem to play well with add_trailing_slash #57
Comments
Kia ora @mandrew BackgroundI've just tested to confirm a suspicion locally - the new trailing slash feature feature forces a site to use one or the other - when the "wrong" version is loaded a By default that is
And the opposite for
This fails with SAML Responses as POST is usually dropped when performing a redirect (GET is usually used on the new location instead). In contrast to either of the
or
This third option is obtainable for the entire site by either configuring it to not apply, or perhaps by including SilverStripe\Core\Injector\Injector:
SilverStripe\Control\Middleware\CanonicalURLMiddleware:
properties:
enforceTrailingSlashConfig: false or SilverStripe\Core\Injector\Injector:
SilverStripe\Control\Middleware\CanonicalURLMiddleware:
properties:
enforceTrailingSlashConfigIgnorePaths:
- '/' The latter should work as the assessment is done via Your specific use caseThe example you've used in your issue description is obviously edited, so it's hard to say. But if the formatting is still in exactness, one of two things is happening:
As above I think your solution is probably the best one. What remains for this issue is for that troubleshooting process to be documented. I've been investigating this topic as it has caught me out too with an upgrade from CMS 4 to CMS 5 with the |
Hi, we have noticed an issue when setting the yml config add_trailing_slash: true with our setup. (https://docs.silverstripe.org/en/5/changelogs/5.0.0/#trailing-slash)
We have a slightly custom setup (https://github.com/silverstripe/silverstripe-saml/blob/main/docs/en/developer.md#create-your-own-saml-configuration-for-completely-custom-settings) that simply sets the SAML url to "$[ID] . saml/url-goes-here"
In live mode SAML returns an error:
[Unknown Error] [SAML-65dd445b59f81] [code: 8] SAML Response not found, Only supported HTTP_POST Binding (/var/www/mysite/.../vendor/onelogin/php-saml/src/Saml2/Auth.php:258)
GET /saml/url-goes-here/
Line in
Trace
After scratching our heads for a while, removing the add_trailing_slash config made it work again. Setting the config below seems to fix the issue, however we think this should be better dealt with in the module?
Also open to any better config that we might have missed :)
The text was updated successfully, but these errors were encountered: