Bug 16818

Summary: CAS redirect broken under Plack
Product: Koha Reporter: Jesse Weaver <jweaver>
Component: AuthenticationAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: brendan, dpavlin, f.demians, fridolin.somers, jonathan.druart, julian.maurice, matthias.meusburger, mtj
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15816
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19373
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16818: External auth redirect broken under Plack
[SIGNED-OFF] Bug 16818: External auth redirect broken under Plack
Bug 16818: External auth redirect broken under Plack

Description Jesse Weaver 2016-06-27 17:06:18 UTC
The redirect for CAS authentication is broken under Plack, as it depends on SCRIPT_NAME. Do we want to use the same hack we used to fix bug 15816 to fix this?
Comment 1 Fridolin Somers 2016-07-01 09:49:13 UTC
I've had this issue.
Indeed OPAC url is /cgi-bin/koha/opac-user.pl but for plack it is /opac/opac-user.pl

Did you use the koha debian package ?
Comment 2 Jesse Weaver 2016-07-08 22:15:48 UTC Comment hidden (obsolete)
Comment 3 Matthias Meusburger 2016-07-26 13:26:59 UTC
Tested ok with the patch on a previously broken CAS-Plack installation. Signing-off.
Comment 4 Matthias Meusburger 2016-07-26 13:36:51 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-08-02 09:58:59 UTC
Created attachment 53879 [details] [review]
Bug 16818: External auth redirect broken under Plack

Test plan:

0) Have either CAS or Shibboleth authentication enabled under Plack.
1) Hover over the authentication link on the staff client or OPAC, and
   notice that it has either '.../opac/...' or '.../intranet/...' instead
   of '.../cgi-bin/koha/...'. (This will be a complete dealbreaker for CAS
   authentication.)
2) Apply patch.
3) Check links again; they should now have the correct paths.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not test CAS or Shibboleth, but no regression found.
Comment 6 Brendan Gallagher 2016-08-04 19:43:12 UTC
Pushed to Master - Should be in the November 2016 release.  Thanks!
Comment 7 Frédéric Demians 2016-08-05 06:45:14 UTC
Pushed in 16.05. Will be in 16.05.03.
Comment 8 Julian Maurice 2016-08-17 13:35:40 UTC
Patch pushed to 3.22.x, will be in 3.22.10