Bugzilla – Attachment 179188 Details for
Bug 39305
About page must warn if Plack is not running
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39305: Display a warning on the about page if Plack is not running
Bug-39305-Display-a-warning-on-the-about-page-if-P.patch (text/plain), 2.05 KB, created by
David Nind
on 2025-03-11 20:26:38 UTC
(
hide
)
Description:
Bug 39305: Display a warning on the about page if Plack is not running
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-03-11 20:26:38 UTC
Size:
2.05 KB
patch
obsolete
>From a32e7b8a9664ac8914a668e4bdb61df47bd8dcad Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 11 Mar 2025 15:29:10 +0100 >Subject: [PATCH] Bug 39305: Display a warning on the about page if Plack is > not running > >CSRF protection is only working if Koha is running under Plack. > >The about page is not showing any errors if plack is not running. > >Test plan: >0. Do not apply this patch >1. Go to the about page >=> Notice the "PSGI" entry in the "Server information" tab >2. Disable plack >koha-plack --disable kohadev && restart_all >3. Go to the about page >=> Notice that the "PSGI" entry is not displayed, and nothing indicates >that plack is not running >4. Apply this patch >=> "PSGI" now shows "Koha is running in CGI mode. This is a security issue! Use koha-plack --help" > >Better wording idea welcome. > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 904b37f372..0232760a6f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -118,12 +118,14 @@ > <th scope="row">Apache version: </th> > <td>[% apacheVersion | html %]</td> > </tr> >- [% IF (is_psgi) %] >- <tr> >- <th scope="row">PSGI: </th> >+ <tr> >+ <th scope="row">PSGI: </th> >+ [% IF is_psgi %] > <td>[% psgi_server | html %]</td> >- </tr> >- [% END %] >+ [% ELSE %] >+ <td class="error">Koha is running in CGI mode. This is a security issue! Use <code>koha-plack --help</code></td> >+ [% END %] >+ </tr> > [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %] > <tr> > <th scope="row">Elasticsearch: </th> >-- >2.39.5
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 39305
:
179168
|
179188
|
179194
|
179211
|
179212
|
179213