Confirm Logout and Redirects#5871
Conversation
…ion var. Ensuring that we can use redirects from outside SMF if needed.
…utsideRedirect Fixed missing closing div
|
FYI, once I merge the auth_secret code from 2.0.16, we'll want to change this to use |
Sesquipedalian
left a comment
There was a problem hiding this comment.
As I said in my comment above, this will also need to be changed to use get_auth_secret() instead of $image_proxy_secret once my forthcoming PR adding get_auth_secret() has been merged.
|
I could add a placeholder for get_auth_secret() so it can be updated once ready. The placeholder can just use the image proxy for now. |
If the member is logged in, we still want to redirect.
|
Any issues with merging this PR? |
|
I'd rather see this one in sooner rather than later for broader testing coverage. |
|
Does this have to use base64? Is there a problem with urlencode? |
|
It made it safer and easier to deal with browser manipulation. |
|
Not sue I quite follow you on the safety bit—you mean that it isn't plain text? Is base64 really the right tool for the job? Seems overkill to me. I seem to vaguely remember support issues on the forum about zealous malware scanners tripping up and removing base64 calls. (Many years ago) I also found this Stack Overflew post which states that this is bad to do:
|
|
uhh bump |
|
Let me do some testing again. When I was testing between SMF and MediaWiki, things would not return back to MediaWiki properly. When I did it with the base64 encoding, things worked as expected. This PR is over a year old now so I have forgot what I did during my testing to come to the conclusion that base64 was needed other than that the URL would not be correct when we returned to MediaWiki. |
# Conflicts: # other/buildTools
|
I got something that works. SMF calls this in QueryString.php Which completely breaks the URL since it has a & in it. SMF makes it a & So this has to run the un_htmlspecialchars process because of that. Otherwise the check will never work. |
This PR has two changes.
The first change is we fix it so Logins can properly redirect back out to 3rd party integrations, as long as they have formatted the URL and supplied a hash via the image proxy check. We use the image proxy check as it seems redundant at this stage to create another secret key for this. If this is good enough to prevent abuse for the proxy, its good enough for a integration.
The second change here is we are allowing logouts to have a prompt. This addresses #5869
This is mostly designed as external integrations may not have the ability to get SMF's session information to perform the automatic logout, and thus allows a proper confirmation page to log the user out properly.
We also in this properly address a logout redirect from a 3rd party integration as well.