Bug 24711

Summary: Can't log in to OPAC after logout if OpacPublic disabled
Product: Koha Reporter: Nick Clemens <nick>
Component: OPACAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: 1joynelson, hayleypelham, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.05, 19.05.10, 18.11.16
Attachments: Bug 24711: Don't add logout input to login form
Bug 24711: Don't add logout input to login form
Bug 24711: Don't add logout input to login form

Description Nick Clemens 2020-02-21 21:09:35 UTC
With OpacPublic disabled you are routed to
http://localhost:8080/cgi-bin/koha/opac-main.pl?logout.x=1
upon logout.

opac-auth.tt adds any inputs it is passed to the login form 

So you get:
<input type="hidden" name="logout.x" value="1">

Login, and immediately get logged out
Comment 1 Nick Clemens 2020-02-21 21:14:41 UTC
Created attachment 99453 [details] [review]
Bug 24711: Don't add logout input to login form

To test:
1 - Set OpacPublic syspref to 'Disable'
2 - Log in to OPAC
3 - Log out
4 - Try to log in again
5 - No error, but you get the login form again
6 - Apply patch
7 - Repeat
8 - This time you can log in again
Comment 2 David Nind 2020-02-22 05:58:03 UTC
Created attachment 99457 [details] [review]
Bug 24711: Don't add logout input to login form

To test:
1 - Set OpacPublic syspref to 'Disable'
2 - Log in to OPAC
3 - Log out
4 - Try to log in again
5 - No error, but you get the login form again
6 - Apply patch
7 - Repeat
8 - This time you can log in again

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2020-02-23 10:17:28 UTC
Created attachment 99466 [details] [review]
Bug 24711: Don't add logout input to login form

To test:
1 - Set OpacPublic syspref to 'Disable'
2 - Log in to OPAC
3 - Log out
4 - Try to log in again
5 - No error, but you get the login form again
6 - Apply patch
7 - Repeat
8 - This time you can log in again

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2020-02-24 09:58:47 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-03-30 22:01:21 UTC
pushed to 19.11.x branch for 19.11.05
Comment 6 Lucas Gass 2020-04-08 14:33:32 UTC
backported to 19.05.x for 19.05.10
Comment 7 Hayley Pelham 2020-04-14 02:38:02 UTC
Backported to 18.11.x for 18.11.16