From b5e08d0137c584b81a7404d0ba298507fb39f955 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 29 Nov 2013 13:59:12 +0000 Subject: [PATCH] Bug 8446: Ensure user is returned to requested page after auth Added querystring to the target path in shibboleth URL so that when a user is authenticated he/she is returned to the correct page they requested before authentication. (think clicking a link to opac-detail.pl?biblionumber=12345) --- C4/Auth_with_Shibboleth.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Auth_with_Shibboleth.pm b/C4/Auth_with_Shibboleth.pm index da3bb9f..072593e 100644 --- a/C4/Auth_with_Shibboleth.pm +++ b/C4/Auth_with_Shibboleth.pm @@ -49,6 +49,9 @@ sub login_shib_url { my ($query) = @_; my $param = $protocol . C4::Context->preference('OPACBaseURL') . $query->script_name(); + if ( $query->query_string() ) { + $param = $param . '%3F' . $query->query_string(); + } my $uri = $protocol . C4::Context->preference('OPACBaseURL') . "/Shibboleth.sso/Login?target=$param"; return $uri; } -- 1.7.10.4