Bugzilla – Attachment 30284 Details for
Bug 8446
Shibboleth authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
BUG8446, Follow up: Adds Shibboleth authentication
BUG8446-Follow-up-Adds-Shibboleth-authentication.patch (text/plain), 2.39 KB, created by
Martin Renvoize (ashimema)
on 2014-07-29 14:06:35 UTC
(
hide
)
Description:
BUG8446, Follow up: Adds Shibboleth authentication
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-07-29 14:06:35 UTC
Size:
2.39 KB
patch
obsolete
>From 9f87122cfd0880431be8359e5c89635f47365e53 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 29 Nov 2013 14:16:27 +0000 >Subject: [PATCH] BUG8446, Follow up: Adds Shibboleth authentication > >- Use syspref OpacBaseURL instead of ENV{'SERVER_NAME'} as this wont > work if koha is behind a reverse proxy. > - To use multiple vhosts, set OpacBaseURL per vhost explicitly with > 'SetEnv OpacBaseURL Value' as per Bug 10325 > >BUG8446, Follow up: Adds Shibboleth authentication > >- Ensure user is returned to requested page after authentication > - 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. > Example where this is important: When a user clicks a direct > biblio link of the form - /opac-detail.pl?biblionumber=12345 > >BUG8446, Follow up: Remove unused imports from scripts > >- Remove import of deprecated C4::Utils module from shibboleth > authentication module: Auth_with_shibboleth.pm > >Signed-off-by: Jesse Weaver <pianohacker@gmail.com> >--- > C4/Auth_with_Shibboleth.pm | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth_with_Shibboleth.pm b/C4/Auth_with_Shibboleth.pm >index 3b0a9fb..13f4b79 100644 >--- a/C4/Auth_with_Shibboleth.pm >+++ b/C4/Auth_with_Shibboleth.pm >@@ -22,7 +22,6 @@ use warnings; > > use C4::Debug; > use C4::Context; >-use C4::Utils qw( :all ); > use CGI; > > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug); >@@ -40,7 +39,7 @@ my $protocol = "https://"; > # Logout from Shibboleth > sub logout_shib { > my ($query) = @_; >- my $uri = $protocol . $ENV{'SERVER_NAME'}; >+ my $uri = $protocol . C4::Context->preference('OPACBaseURL'); > print $query->redirect( $uri . "/Shibboleth.sso/Logout?return=$uri" ); > } > >@@ -48,8 +47,11 @@ sub logout_shib { > sub login_shib_url { > > my ($query) = @_; >- my $param = $protocol . $ENV{'SERVER_NAME'} . $query->script_name(); >- my $uri = $protocol . $ENV{'SERVER_NAME'} . "/Shibboleth.sso/Login?target=$param"; >+ 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8446
:
10841
|
22098
|
22107
|
22860
|
23224
|
23225
|
23226
|
25765
|
25766
|
26176
|
26177
|
26178
|
26187
|
26749
|
26750
|
26751
|
26752
|
26760
|
26761
|
26762
|
28892
|
28893
|
28894
|
28895
|
28896
|
28897
|
28898
|
28899
|
28900
|
28901
|
28902
|
28903
|
30017
|
30018
|
30019
|
30020
|
30021
|
30022
|
30023
|
30030
|
30031
|
30033
|
30283
|
30284
|
30285
|
30286
|
30335
|
30353
|
30354
|
30355
|
30356
|
30384
|
30594
|
30604
|
30605
|
30616
|
30617
|
30618
|
30619
|
30620
|
30621
|
30684
|
31407
|
31408
|
31836
|
31905
|
31906
|
31907
|
32125
|
32158
|
32162
|
32163
|
32164
|
32165
|
32166
|
32167
|
32168
|
32169
|
32170
|
32365
|
32366
|
32367
|
32368
|
32369
|
32370
|
32371
|
32372
|
32373
|
32374
|
32426
|
32427