]> git.koha-community.org Git - koha.git/commit
Bug 30199: Do not generate jwt if patron does not exist
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 18 Mar 2022 09:26:48 +0000 (10:26 +0100)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Tue, 10 May 2022 01:47:01 +0000 (03:47 +0200)
commit661147c6db690077c3ce666d1f13d9d1c51d3287
treec3d4841d146feb57355346bf39d4afacd7e2323a
parentd890b84e3e17a115d5d598b58429bb56890c5d62
Bug 30199: Do not generate jwt if patron does not exist

This is a follow-up patch for bug 29543. If an invalid cardnumber has
been used we should not generate a token.

Test Plan:
1. Set SelfCheckoutByLogin to 'cardnumber'.
2. Go to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
3. Enter an invalid carnumber like 'thisisabadcardnumber'
4. See the appropriate message "Sorry The userid thisisabadcardnumber was not found in the database. Please try again."
5. Try again with a different cardnumber and notice the same exact error message including the 'thisisabadcardnumber' cardnumber.
6. Apply this patch
7. Restart all the things!
8. Repeat steps 2-4
9. Try again with a different cardnumber, you should now see the correct
   cardnumber!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e5aeb047a563b20769d49c2777d47039581ca7bd)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit a7bc65b0a3117df4faa881cf2d823d8987188433)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
opac/sco/sco-main.pl