]> git.koha-community.org Git - koha.git/commit
Bug 31250: Deny clearing cookies with numeric suffix
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 28 Jul 2022 12:43:20 +0000 (12:43 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Sep 2022 18:34:11 +0000 (15:34 -0300)
commitcb036faf2c534a14708b517cea40d98fc6e344c2
tree4832e6387dbc601b278d34800371986f6d7a285f
parent3affdad4c2e478e9df0ce06306daacc27925f0ce
Bug 31250: Deny clearing cookies with numeric suffix

This change allows us to add catalogue_editor_ to the deny list
in koha-conf.xml and keep cookies like catalogue_editor_123.

Test plan:
Run t/CookieManager.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
To test:
1 - Sign in to staff client
2 - Search for records and edit one
3 - Switch to advanced editor
4 - View cookies (F12/developer panel/storage tab)
5 - Note cookie like 'catalogue_editor_##' with value 'advanced'
6 - Log out
7 - note cookie value deleted
8 - Log in and search/edit a record
9 - Basic editor loads
10 - Apply patch
11 - Add line to koha-conf as described in second patch
12 - Restart all
13 - Switch to advanced editor
14 - Cookie value updated
15 - Logout
16 - Cookie value remains
17 - Log in and search/edit
18 - Confirm advanced editor loads

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/CookieManager.pm
t/CookieManager.t