Problem/Motivation
When you're in a multlingual drupal website, with language negotiation set up using path prefixes, the generated consumer endpoint will include the language prefix of the language currently in use.
For example, if you're on the English version of a Drupal website, that'll result in the consumer endpoint being generated as /en/saml/consume instead of /saml/consume .
Steps to reproduce
* Install multiple languages, for example English and French
* Set them up to use distinct prefixes per language, /en for English and /fr for French
* Enable SAML SP
* Check the generated consumer endpoint
Proposed resolution
Force the URL to be generated without path prefix.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3239120-3-consume-no-prefix.patch | 1.05 KB | DeFr |
Issue fork saml_sp-3239120
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
DeFr commentedComment #3
DeFr commentedUploaded the patch above in a hurry, rerolling it from a patch I made for a project and it's not plain wrong, not patching the correct Url call, sorry for that.
Corrected patch attached.
Comment #4
jcisio commentedI'm not sure whether it is a bugfix or a behavior change. In any case, remove the prefix won't break anything (prefixed url still works).
Comment #5
denix commentedWe are using the patch since a couple of months now and it is stable and working. Thanks
Comment #7
jproctorComment #11
PaEricksonWaTech commentedMy SAML login trust stopped working after installing Version: 4.1.0. (on a multi-lingual site)
It seems the generated metadata still contains the language code in the Assertion Urls. And the "Assertion Urls" form field on the saml_sp settings page uses the language code as a default. I don't know a lot about how this all works, but shouldn't the generated metadata be consistent with the Consumer Endpoint? If we remove the language code from the endpoint, it should also be removed from the metadata.
Comment #12
matthijsI created a follow-up issue for the inconsistency reported above: #3316762: Metadata incorrectly includes the language prefix