Bug 28091 - Add meta tag with Koha version number to staff interface pages
Summary: Add meta tag with Koha version number to staff interface pages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-05 17:57 UTC by Lucas Gass (lukeg)
Modified: 2022-06-06 20:25 UTC (History)
4 users (show)

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


Attachments
Bug 28091: add meta content with Koha version to staff client pages (1.21 KB, patch)
2021-04-05 18:44 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 28091: add meta content with Koha version to staff client pages (1.26 KB, patch)
2021-04-05 20:18 UTC, David Nind
Details | Diff | Splinter Review
Bug 28091: add meta content with Koha version to staff client pages (1.33 KB, patch)
2021-05-07 18:04 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 28091: Only show for logged in users (1.19 KB, patch)
2021-05-07 18:04 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2021-04-05 17:57:24 UTC
On the OPAC in the HTML head there is a line like this:

<meta name="generator" content="Koha 20.1200024">

This is super helpful when writing jQuery that is only useful for a particular version of Koha.

The staff client pages should include the same.
Comment 1 Lucas Gass (lukeg) 2021-04-05 18:44:19 UTC
Created attachment 119187 [details] [review]
Bug 28091: add meta content with Koha version to staff client pages

TO test:
-apply patch
-go to the Koha staff client and inspect the page, look at the HTML <head>
-there should be a line that looks like this:
<meta name="generator" content="Koha 20.12.00">
Comment 2 David Nind 2021-04-05 20:18:29 UTC
Created attachment 119188 [details] [review]
Bug 28091: add meta content with Koha version to staff client pages

TO test:
-apply patch
-go to the Koha staff client and inspect the page, look at the HTML <head>
-there should be a line that looks like this:
<meta name="generator" content="Koha 20.12.00">

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Kyle M Hall (khall) 2021-05-07 17:56:57 UTC
I like this idea a lot, but I think it should be hidden on the login screen since that would allow an unauthenticated user to know what version of Koha is being run. That data could be used for automated attacks against Koha server. It's unlikely I know, but it is a security best practice.
Comment 4 Kyle M Hall (khall) 2021-05-07 17:59:25 UTC
(In reply to Kyle M Hall from comment #3)
> I like this idea a lot, but I think it should be hidden on the login screen
> since that would allow an unauthenticated user to know what version of Koha
> is being run. That data could be used for automated attacks against Koha
> server. It's unlikely I know, but it is a security best practice.

I think wrapping that in [% IF logged_in_user %] [% END %] would be sufficient to fix the issue.
Comment 5 Kyle M Hall (khall) 2021-05-07 18:04:44 UTC
Created attachment 120710 [details] [review]
Bug 28091: add meta content with Koha version to staff client pages

TO test:
-apply patch
-go to the Koha staff client and inspect the page, look at the HTML <head>
-there should be a line that looks like this:
<meta name="generator" content="Koha 20.12.00">

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Kyle M Hall (khall) 2021-05-07 18:04:55 UTC
Created attachment 120711 [details] [review]
Bug 28091: Only show for logged in users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Jonathan Druart 2021-05-12 15:47:03 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-05-31 14:40:42 UTC
Small useful enhancement, I choose to backport.

Pushed to 20.11.x for 20.11.07
Comment 9 Victor Grousset/tuxayo 2021-06-08 23:19:53 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.