| Summary: | Use psgi_env from errors/* controller scripts | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
| Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | dcook, martin.renvoize, matthias.meusburger |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | 26048 | ||
| Bug Blocks: | |||
| Attachments: | Bug 27555: Use psgi_env from errors sripts | ||
When I was working on Bug 26048, I thought it would be enough to check for environmental variables starting with "psgi." but I don't think they were being set, but there were "plack." environmental variables. So we'd need to make sure to update "psgi_env" in C4::Auth if we did use it Created attachment 118292 [details] [review] Bug 27555: Use psgi_env from errors sripts I don't understand why psgi_env and safe_exit were in the BEGIN block. Should we expect a regression from CAS or Shib auth here? Hmm, pass I'm afraid... I think that predates the work I did on Shibboleth.. I just used it.. Hopefully Matts knows? Hi, Actually, the psgi compatibility was written by eiro at the time, see https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3551 That being said, I don't see why they should be in the BEGIN block either. *** This bug has been marked as a duplicate of bug 29420 *** |
errors/* controller scripts are using any { /(^psgi\.|^plack\.)/i } keys %ENV to know if we are running under psgi. This is also defined in C4::Auth (psgi_env subroutine), but it's not available as it is in BEGIN. We should put this trick in an exportable subroutine to make it accessible from pl scripts.