Bug 18387 - 404 errors on page causes SCO user to be logged out
Summary: 404 errors on page causes SCO user to be logged out
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-05 12:15 UTC by Nick Clemens
Modified: 2018-07-11 05:47 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18387: Allow sco-user to access errors templates (1.18 KB, patch)
2018-07-09 13:32 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-04-05 12:15:25 UTC
If AutoSelfCheck is enabled but there is a 404 error in fetching resources on an SCO page the user is logged out on each request. This is because a 404 also requests the errorpages.tt which is outside the SCO module.

This causes a redirect to the opac-auth page when trying to print receipts after completing SCO transaction

To recreate:
1 - Enable AuthoSelfCheck prefs
2 - In opacuserjs or scouserjs add a fetch of an unreachable resources
3 - Visit the SCO
4 - Sign in as a patron then click 'finish'
5 - Say 'yes' to receipt
6 - Note you are directed to log in
Comment 1 Nick Clemens 2017-04-07 14:20:28 UTC
Looks like a 304 and others can trigger this as well
Comment 2 Eugene Espinoza 2017-04-09 01:47:40 UTC
Hi! We're experiencing this too in one of our Koha installation, 16.11.05.
Comment 3 Jonathan Druart 2017-04-11 20:10:34 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2017-04-11 20:10:52 UTC
I would not consider this as a bug, you just need to fix the url ...right?
Comment 5 Nick Clemens 2017-04-11 20:16:30 UTC
(In reply to Jonathan Druart from comment #4)
> I would not consider this as a bug, you just need to fix the url ...right?

Technically yes, but no visible error is thrown to the user, you are just silently signed out. Why fetch the 404 error template if we aren't displaying it?
Comment 6 Nick Clemens 2018-07-09 13:32:23 UTC
Created attachment 76797 [details] [review]
Bug 18387: Allow sco-user to access errors templates

To test:
 1 - Enable AuthoSelfCheck prefs
 2 - In opacuserjs or scouserjs add a fetch of an unreachable resources
 3 - Visit the SCO
 4 - Sign in as a patron then click 'finish'
 5 - Say 'yes' to receipt
 6 - Note you are directed to log in
 7 - Apply patch
 8 - Restart all the things
 9 - Repeat 4 & 5
10 - Sucess, receipt prints
Comment 7 Katrin Fischer 2018-07-11 05:47:55 UTC
Nick, please don't forget to set the assignee on your bugs!