Bugzilla – Attachment 8391 Details for
Bug 7745
Using OPACBaseURL for CAS Authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-Bug-7745-Wrong-service-name-for-CAS-authentification.patch (text/plain), 2.66 KB, created by
Matthias Meusburger
on 2012-03-21 10:16:46 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2012-03-21 10:16:46 UTC
Size:
2.66 KB
patch
obsolete
>From 0f999df035705578df92993c53fe1d37482d73b1 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 19 Jul 2011 12:14:00 +0200 >Subject: [PATCH] Bug 7745: Wrong service name for CAS authentification > >When behind a proxy, Koha give a wrong service name to CAS server >(SCRIPT_URI environment variable). It now uses OPACBaseURL syspref. > >Note: despite the OPACBaseURL description, you have to enter the >*full* URL (ie: with http:// or https://) in the syspref. (see Bug >7770) >--- > C4/Auth_with_cas.pm | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm >index b096232..e00e3a4 100644 >--- a/C4/Auth_with_cas.pm >+++ b/C4/Auth_with_cas.pm >@@ -66,7 +66,7 @@ sub getMultipleAuth { > # Logout from CAS > sub logout_cas { > my ($query) = @_; >- my $uri = $ENV{'SCRIPT_URI'}; >+ my $uri = C4::Context->preference('OPACBaseURL') . $query->script_name(); > my $casparam = $query->param('cas'); > # FIXME: This should be more generic and handle whatever parameters there might be > $uri .= "?cas=" . $casparam if (defined $casparam); >@@ -78,7 +78,7 @@ sub logout_cas { > # Login to CAS > sub login_cas { > my ($query) = @_; >- my $uri = $ENV{'SCRIPT_URI'}; >+ my $uri = C4::Context->preference('OPACBaseURL') . $query->script_name(); > my $casparam = $query->param('cas'); > # FIXME: This should be more generic and handle whatever parameters there might be > $uri .= "?cas=" . $casparam if (defined $casparam); >@@ -91,7 +91,7 @@ sub login_cas { > sub login_cas_url { > > my ($query, $key) = @_; >- my $uri = $ENV{'SCRIPT_URI'}; >+ my $uri = C4::Context->preference('OPACBaseURL') . $query->script_name(); > my $casparam = $query->param('cas'); > # FIXME: This should be more generic and handle whatever parameters there might be > $uri .= "?cas=" . $casparam if (defined $casparam); >@@ -107,7 +107,7 @@ sub checkpw_cas { > $debug and warn "checkpw_cas"; > my ($dbh, $ticket, $query) = @_; > my $retnumber; >- my $uri = $ENV{'SCRIPT_URI'}; >+ my $uri = C4::Context->preference('OPACBaseURL') . $query->script_name(); > my $casparam = $query->param('cas'); > # FIXME: This should be more generic and handle whatever parameters there might be > $uri .= "?cas=" . $casparam if (defined $casparam); >@@ -157,7 +157,7 @@ sub check_api_auth_cas { > $debug and warn "check_api_auth_cas"; > my ($dbh, $PT, $query) = @_; > my $retnumber; >- my $url = $query->url(); >+ my $url = C4::Context->preference('OPACBaseURL') . $query->script_name(); > > my $casparam = $query->param('cas'); > $casparam = $defaultcasserver if (not defined $casparam); >-- >1.7.5.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 7745
:
8293
| 8391