https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17050

Jonathan Druart <jonathan.dru...@bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54661|0                           |1
        is obsolete|                            |
  Attachment #54662|0                           |1
        is obsolete|                            |

--- Comment #17 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> 
---
Created attachment 54679
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54679&action=edit
Bug 17050: Do not kick the session out when accessing the REST API

Mojolicious does not set $ENV{REMOTE_ADDR} (neither $ENV{HTTP_*}) as
it may share ENV between different requests.
Fortunately for us, Plack does not!

This is a dirty patch to fix this issue but it seems that there is not
lot of solutions. It adds a remote_addr parameter to
C4::Auth::check_cookie_authin order to send it from
Koha::Rest::V1::startup reading the headers sent by Mojolicious.

Test plan:
Hit /cgi-bin/koha/mainpage.pl
Hit /api/v1/patrons/42
Hit /cgi-bin/koha/mainpage.pl

With this patch applied, everything will be fine and you won't be
logged out.

Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.roks...@kul.oslo.kommune.no>

Signed-off-by: Jonathan Druart <jonathan.dru...@bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to