Reviewed & tested by the community
Project:
simpleSAMLphp Authentication
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 May 2018 at 00:35 UTC
Updated:
22 Apr 2024 at 14:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jnicola commentedLooking for $_SESSION['masquerading'] in SimplesamlSubscriber->checkAuthStatus may allow Masquarade to work effectively with this module.
WARNING: This has potential security implications and has not been tested at this time!
Comment #3
vood002 commentedI'm using 8.x-3.x-dev and was experiencing this issue. This patch solved the issue for me~
Comment #4
berdirNote: You also need to patch hook_user_logout(): #2124117: Unable to masquerade when logging in via SAML
Comment #5
andypostmasquerade no longer use session https://cgit.drupalcode.org/masquerade/commit/?id=3dfe12a
The suggestion is to check that
masqueradeservice exists in container and call its methodisMasquerading()https://cgit.drupalcode.org/masquerade/tree/src/Masquerade.php#n135Comment #6
berdirWell, it's still exactly the same session key behind the scenes, but yeah, we should use the API even though it is a bit more complicated, as we have to integrate with the service optionally.
Comment #7
fengtanSuccessfully tested #6 -- thanks. The code change also makes sense.
I have noticed there is a related issue (#2124117: Unable to masquerade when logging in via SAML) with a different patch, although I did not have to apply the patch there in order to fix the problem.
Comment #8
vijaycs85I have tested the patch in #6 and confirm it is working as expected.
Though the solution looks good, I wonder it would be a good idea to provide a way for other modules to react rather than adding the code here. For example, we dispatch an event so that Masquerade does the check to let the user go.
Comment #9
hazn commentedLooks good to me :) Thanks!