]> git.koha-community.org Git - koha.git/commit
Bug 29914: Make check_cookie_auth compare the userid
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 20 Jan 2022 09:10:05 +0000 (10:10 +0100)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Wed, 26 Jan 2022 04:18:46 +0000 (04:18 +0000)
commit2dd06e940928e5581404a95ae89c1f1094fd8c3a
treec6ae1ad914b6b92e45f4a9041be61e8672bf96f0
parente1954f46ba5e37d6491cca6f0181928dbe118c94
Bug 29914: Make check_cookie_auth compare the userid

check_cookie_auth is assuming that the user is authenticated if a cookie exists
and that the login/username exists in the DB.

So basically if you hit the login page, fill the login input with a
valid username, click "login"
=> A cookie will be generated, and the sessions table will contain a
line with this session id.
On the second hit, if the username is in the DB, it will be enough to be
considered authenticated.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7114dc2fb1a1440dd031ee771efee6e50bb86540)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit be18dc19b8e84919416eab5cd43f4ed345fc280a)

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
C4/Auth.pm
Koha/REST/V1/Auth.pm