Page MenuHomePhabricator

Returning to page after login broken while using SimpleSAMLphp
Closed, DeclinedPublic

Description

Hello Cindy,

while we are using the SimpleSAMLphp extension in combination with PluggableAuth successfully for a while now, we noticed some annoying bug.

Steps to reproduce:

  1. Open the wiki via some URL like https://wiki/Some_Page
  2. Login via SAML IdP
  3. Be returned to https://wiki/Main_Page

Expected result:

  • After login, be returned to Some_Page, not Main_Page.

I am not sure where this breaks... PluggableAuth tries to redirect people, but maybe this gets lost somewhere? Could you give me some hints where to start debugging, so I can provide a patch if necessary?

Thanks in advance!

Cheers,
Oliver

Event Timeline

Hi, Oliver.

That should not be happening. Here's the control flow. When you click on the login link, you are redirected to Special:UserLogin. Unless you have another authentication provider configured as well, you will not actually see Special:UserLogin rendered, because you will be redirected immediately to Special:PluggableAuthLogin. Before that redirect, however, the return to URL, the name of the return to page, and return to query are stored in the session (lines 28 to 48 of PluggableAuthPrimaryAuthenticationProvider.php). Special:PluggableAuthLogin retrieves the return to URL at line 76 of PluggableAuthLogin.php and redirects there if the authentication is successful. I'd start by checking that those session variables get set and retrieved correctly.

Cindy

Aklapper changed the task status from Open to Stalled.Aug 13 2018, 9:33 AM

@Poikilotherm: Could you please reply?

Unfortunately closing this report as no further information has been provided.

@Poikilotherm: After you have provided the information asked for and if this still happens, please set the status of this report back to "Open" via the Add Action...Change Status dropdown. Thanks!