Bug 28367 - Wrong plack condition in C4/Auth_with_shibboleth.pm
Summary: Wrong plack condition in C4/Auth_with_shibboleth.pm
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-18 08:42 UTC by Jonathan Druart
Modified: 2022-06-06 20:25 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12,19.11.19
Circulation function:


Attachments
Bug 28367: Fix plack condition in C4/Auth_with_shibboleth.pm (1.53 KB, patch)
2021-05-18 08:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28367: (follow-up) Fix plack condition in C4/Auth_with_shibboleth.pm (1.13 KB, patch)
2021-05-18 09:27 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-05-18 08:42:33 UTC
C4/Auth_with_shibboleth.pm has:
  if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )
When others have:
  if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )

This has been highlighted by https://gitlab.com/koha-community/koha-testing-docker/-/issues/249 that introduces a PLACK_WORKERS env vars, and t/Auth_with_shibboleth.t was failing with

 #   Failed test 'checkpw_shib tests'
 #   at t/Auth_with_shibboleth.t line 335.
 Invalid parameter passed, categorycode= does not exist# Looks like your test exited with 255 just after 5.
Comment 1 Jonathan Druart 2021-05-18 08:43:48 UTC
Created attachment 121094 [details] [review]
Bug 28367: Fix plack condition in C4/Auth_with_shibboleth.pm

C4/Auth_with_shibboleth.pm has:
  if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )
When others have:
  if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )

This has been highlighted by https://gitlab.com/koha-community/koha-testing-docker/-/issues/249 that introduces a PLACK_WORKERS env vars, and t/Auth_with_shibboleth.t was failing with

 #   Failed test 'checkpw_shib tests'
 #   at t/Auth_with_shibboleth.t line 335.
 Invalid parameter passed, categorycode= does not exist# Looks like your test exited with 255 just after 5.
Comment 2 Jonathan Druart 2021-05-18 08:45:06 UTC
Pushed to master for 21.05.00
Comment 3 Jonathan Druart 2021-05-18 09:27:04 UTC
Created attachment 121099 [details] [review]
Bug 28367: (follow-up) Fix plack condition in C4/Auth_with_shibboleth.pm

There were 2 occurrences!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Fridolin Somers 2021-05-18 10:28:22 UTC
We should create a method C4::Context->is_plack()
Comment 5 Fridolin Somers 2021-05-18 10:29:28 UTC
Pushed to 20.11.x for 20.11.06
Comment 6 Andrew Fuerste-Henry 2021-05-25 13:57:26 UTC
Pushed to 20.05.x for 20.05.12
Comment 7 Victor Grousset/tuxayo 2021-05-25 14:51:47 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.
Comment 8 Victor Grousset/tuxayo 2021-05-28 06:08:21 UTC
Got a request for this so:
Backported: Pushed to 19.11.x branch for 19.11.18
Comment 9 Victor Grousset/tuxayo 2021-06-03 16:42:12 UTC
Actually it was for v19.11.18-2, a micro release to contain this last moment patch.
Comment 10 Victor Grousset/tuxayo 2021-06-03 16:47:01 UTC
And I mixed up the patches. It will be for v19.11.19