Koha-clms/C4
David Cook 6164380b08 Bug 28735: Self-checkout users can access opac-user.pl for sco user when not using AutoSelfCheckID
This patch makes the sandboxing of the selfcheckout more robust by
adding a "sco_user" session variable which is turned on when
logging into the self-checkout (either by AutoSelfCheckAllowed or manually).

If a user with this session variable turned on tries to access
other parts of the system (like the rest of the OPAC), it will
"kick out", so that the browser user will lose the authenticated session.

Test plan:
1) Apply the patch
2) koha-plack --restart kohadev
3) Go to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
4) Note that you are logged into the self-checkout
     So you see the login screen specific to the self-checkout.
     To log with the actual patron. It's a nested auth.
5) Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
6) Note that you are not logged into the OPAC
7) Log into the staff interface and disable the
system preference AutoSelfCheckAllowed
8) Log out of the staff interface (this step is very important)
9) Go to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
10) Note that you are prompted to log into Koha
11) Login using the "koha" user (when using koha-testing-docker)
12) Note that you are logged into the self-checkout
13) Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
14) Note that you are not logged into the OPAC
      Without the patch you would still be logged as "koha"
15) Go back to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
16) Note that you will need to log in again as you've lost your
session cookie
      Without the patch you will still be logged in the self-checkout
Voila!

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2022-01-21 07:12:11 +00:00
..
AuthoritiesMarc
…
Barcodes Bug 21937: Syspref autoBarcode annual doesn't increment properly barcode 2019-04-19 14:32:36 +00:00
ClassSortRoutine
…
ClassSplitRoutine Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00:00
Creators Bug 25852: Improve C4::Creators::Lib reliability under plack 2020-08-17 08:37:59 +12:00
External Bug 22010: Check preferences for ebook integration 2019-04-30 11:42:51 +00:00
Form
…
Heading Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-03-13 00:39:55 +00:00
ILSDI Bug 17247: (follow-up) Terminology fix: Use Restricted instead of debarred 2019-10-15 14:11:03 +01:00
Installer Bug 29543: [19.11] Enforce authentication for self-checkout 2022-01-21 04:39:38 +00:00
Labels Bug 23514: Split Call Numbers for all layout types 2020-05-04 20:48:21 +00:00
Linker Bug 28676: Cache and retrieve match_count when searching a cached heading 2021-10-18 02:28:22 +00:00
Members Bug 24447: Changing 'DUE' to example in database that exists. 2021-02-04 18:35:06 +01:00
OAI
…
Output
…
Patroncards Bug 23488: Line wrapping doesn't always respect word order in Patron card creator 2020-04-01 20:41:25 +00:00
Reports Bug 25000: SQL report not updated 2020-04-03 23:04:04 +00:00
SIP Bug 27196: [19.11.x] Don't explode if item that is waiting if checked in by SIP 2021-02-01 21:15:31 +01:00
Search
…
Serials
…
Utils Bug 27715: (QA follow-up) Remove conditional declaration 2021-02-23 22:32:58 +01:00
Accounts.pm Bug 23049: Capitalise type passed to add_debit for lost_item 2019-10-24 17:24:33 +01:00
Acquisition.pm Bug 27203: Calculate tax based on ecost if unitprice not set 2021-05-25 16:42:06 +02:00
Auth.pm Bug 28735: Self-checkout users can access opac-user.pl for sco user when not using AutoSelfCheckID 2022-01-21 07:12:11 +00:00
Auth_cas_servers.yaml.sample
…
Auth_with_cas.pm
…
Auth_with_ldap.pm Bug 16719: (QA follow-up) Remove tabs 2020-03-05 00:30:03 +00:00
Auth_with_shibboleth.pm Bug 28367: (follow-up) Fix plack condition in C4/Auth_with_shibboleth.pm 2021-05-28 08:07:46 +02:00
AuthoritiesMarc.pm Bug 22437: (follow-up) Move deletion of merge requests to DelAuthority 2020-05-13 16:13:06 +00:00
BackgroundJob.pm
…
Barcodes.pm
…
Biblio.pm Bug 25189: Don't create authority if results found 2020-12-18 23:14:37 +01:00
Bookseller.pm Bug 24002: Incorrect DATE value: '' in C4/Bookseller.pm 2019-11-12 13:50:06 +00:00
Boolean.pm
…
Breeding.pm Bug 23542: Fix SRU import encoding 2020-08-17 21:53:46 +12:00
Budgets.pm Bug 10577: (QA follow-up) Remove tab chars 2019-03-28 12:46:14 +00:00
Calendar.pm Bug 26000: Make exception_holidays cache with branch in key 2020-08-19 17:32:57 +12:00
Charset.pm Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
Circulation.pm Bug 26457: [19.11.x] Throw exception if update of issues table fails 2021-03-24 00:39:44 +01:00
ClassSortRoutine.pm
…
ClassSource.pm Bug 15836: Remove deprecated subroutines 2018-11-13 18:56:18 +00:00
ClassSplitRoutine.pm Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00:00
Context.pm Bug 25360: Use secure flag for CGISESSID cookie when using HTTPS 2020-08-25 15:41:41 +12:00
Contract.pm
…
CourseReserves.pm Revert "Bug 23727: Editing course reserve items is broken" 2020-05-19 23:46:46 +00:00
Creators.pm
…
Debug.pm
…
HTML5Media.pm Bug 27422: YouTube videos are HTTPS only 2021-02-22 03:02:04 +01:00
Heading.pm Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-03-13 00:39:55 +00:00
HoldsQueue.pm Bug 18958: (follow-up) Ensure hold fill target reserve_id is set for all hold types 2020-10-20 14:32:24 +13:00
Images.pm Revert "Bug 21987: Do not generate true color thumbnails if not needed" 2019-11-04 13:21:53 +00:00
ImportBatch.pm Bug 24827: Specify UTF-8 as encoding in new_from_xml() 2020-04-03 18:14:07 +00:00
ImportExportFramework.pm Bug 27968: Fix framework import if isurl has an incorrect value 2021-05-24 20:32:29 +02:00
InstallAuth.pm Bug 25360: Use secure flag for CGISESSID cookie when using HTTPS 2020-08-25 15:41:41 +12:00
Installer.pm Bug 24872: Set languages prefererences after install 2020-04-03 21:35:48 +00:00
ItemCirculationAlertPreference.pm
…
Items.pm Bug 23081: [19.11.x] Set items.issues to 0 if not provided (AddItem) 2020-05-11 19:12:03 +00:00
Koha.pm Bug 22302: Make ITEMTYPECAT descriptions fallback to lib description if no opac description 2020-02-11 00:12:49 +00:00
Labels.pm
…
Languages.pm Bug 18213: Add Template plugin and fix for C4/Languages 2019-03-28 15:57:32 +00:00
Letters.pm Bug 24612: Use the reserve_id to identify a reserve when building a notice 2020-06-11 05:03:13 +00:00
Linker.pm
…
Log.pm Bug 23896: logaction should pass the correct interface to Koha::Logger 2020-02-10 23:19:01 +00:00
MarcModificationTemplates.pm Bug 24840: [19.11.x] Replace DateTime->now with dt_from_string 2020-05-07 17:17:12 +00:00
Matcher.pm Bug 24348: Pass marc record to _passes_required_checks 2020-02-10 22:37:22 +00:00
Members.pm Bug 26517: Avoid deleting patrons with permission 2021-04-22 16:56:21 +02:00
Message.pm Bug 21206: Replace C4::Items::GetItem 2019-02-26 13:24:07 +00:00
NewsChannels.pm Bug 24002: Incorrect DATE value: '00-00-0000' in NewsChannels.pm 2019-11-12 13:49:58 +00:00
Output.pm Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml 2020-07-13 14:19:15 +12:00
Overdues.pm Bug 27079: Floating point comparison correction 2020-12-16 22:53:10 +01:00
Patroncards.pm
…
Print.pm
…
Record.pm Bug 26414: Unable to export Withdrawn status using CSV profile 2020-10-27 16:56:23 +13:00
Reports.pm
…
Reserves.pm Bug 28644: [19.11.x] Fix calling borrowernumber on undefined value 2021-09-08 01:00:53 +00:00
Ris.pm
…
RotatingCollections.pm
…
SMS.pm
…
Scheduler.pm
…
Scrubber.pm
…
Search.pm Bug 12430: Use releance ranking without QueryWeightFields 2020-12-17 15:16:04 +01:00
Serials.pm Bug 24903: Special characters like parentheses in numbering pattern cause duplication in recievedlist 2020-05-04 21:31:05 +00:00
Service.pm
…
ShelfBrowser.pm Bug 22445: Custom cover images - opac shelfbrowser 2019-10-22 15:02:48 +01:00
SocialData.pm
…
Stats.pm Bug 21683: Remove accountlines.accountno 2019-03-21 18:19:22 +00:00
Suggestions.pm Bug 22778: Suggestions with no "suggester" can cause errors 2020-05-04 20:50:55 +00:00
TTParser.pm Bug 25257: Preserve prolog on translated XML files 2020-05-08 20:33:57 +00:00
Tags.pm
…
Templates.pm
…
TmplToken.pm
…
TmplTokenType.pm
…
UsageStats.pm Bug 23233: AllowItemsOnHoldCheckout is misnamed and does not indicate it is for SIP-based checkouts only 2020-01-15 00:02:18 +00:00
XISBN.pm Bug 26270: Fix ThingISBN after a change in behaviour 2020-09-02 10:29:14 +12:00
XSLT.pm Bug 7611: (follow-up) separate positive and negative statuses as in the past 2020-04-21 18:58:31 +00:00