Ticket #2935 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

Log In link in top (black) bar doesn't send a bounce

Reported by: bettse Assigned to: gallardj
Priority: critical Milestone: 1.1
Component: Elgg Version:
Keywords: Cc:

Description

when a user is on a page and clicks login, then comes back from sso, they should land back on the same page. this is done through passing the sso page a bounce= parameter. Trac's login module doesn't have a problem with this, but elgg's does, and since the only Log In we have now is in the top bar provided by elgg, we need to correct it to properly pass the bounce URL.

Change History

01/21/09 13:12:59 changed by bettse

  • milestone set to 1.1.

01/22/09 19:52:27 changed by bettse

  • priority changed from major to critical.

I had a student contact me suggestions this exact thing, so this is obviously something that people want and I'm gonna bump up its priority

01/26/09 15:38:53 changed by gallardj

  • owner set to gallardj.
  • status changed from new to assigned.

01/26/09 15:41:25 changed by bettse

Joe Selman emailed me with a potential patch:

This just changes the login link in the upper right corner to go directly to the SSO login page.  Now I'm not exactly sure this won't break anything (does elgg do anything when a login request is received other than redirect?) but I faked it by hand and it seemed to be OK.
Index: mod/toolbar/toolbarloggedout.inc
===================================================================
--- mod/toolbar/toolbarloggedout.inc	(revision 191)
+++ mod/toolbar/toolbarloggedout.inc	(working copy)
@@ -1,6 +1,7 @@
<div id="elggtoolbar"><!-- start toolbar -->
     <form action="{{url}}login/index.php" method="post">
-        <a href="{{url}}login/index.php">{{logon}}</a> 
+        <a
+        href="https://secure.onid.oregonstate.edu/login?service=code&bounce={currentpage}">{{logon}}</a> 
    </form>
    <div id="powered-by-elgg"><!-- open div global_menuoptions -->
       <a href="http://elgg.org/"><img src="{{url}}mod/template/icons/elgg_powered.png" alt="{{poweredby}}" /></a>
Index: lib/templates.php
===================================================================
--- lib/templates.php	(revision 191)
+++ lib/templates.php	(working copy)
@@ -930,6 +930,10 @@
        case "url":
            $result =  url;
            break;
+        
+        case "currentpage":
+            $result =  $_SERVER['REQUEST_URI'];
+            break;

        case "sitename":
            $result =  $CFG->sitename;

This is still untested, and I think REQUEST_URI would need to be replaced by HTTP_REFERER at least.

01/26/09 16:26:09 changed by gallardj

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [197]) Fixes #2935. Grabs the HTTP_REFERER and shoves that into the bounce param in the sso url.

01/28/09 22:39:52 changed by cedenoj

(In [208]) refs #2827 , #3026 , #2890 , #2935 , #2985, #2933 , #2887 , #3935, #2929 , #2931 Creating new tag