Bug 36378 - Cannot stay logged in if AutoLocation is enabled but library's IP address is not set correctly
Summary: Cannot stay logged in if AutoLocation is enabled but library's IP address is ...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 36427
  Show dependency treegraph
 
Reported: 2024-03-20 19:08 UTC by Kyle M Hall
Modified: 2024-05-14 13:35 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly (1.34 KB, patch)
2024-03-20 19:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly (1.40 KB, patch)
2024-03-22 15:44 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly (1.47 KB, patch)
2024-05-13 10:19 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2024-03-20 19:08:30 UTC
We can get into a scenario what a user cannot stay logged in for more than a single page load. If AutoLocation is enabled without branch IP addresses being set, you will be logged out with every page load.
Comment 1 Kyle M Hall 2024-03-20 19:23:30 UTC
It looks like branchip has to contain a space to trigger the issue.
Comment 2 Kyle M Hall 2024-03-20 19:34:54 UTC
Created attachment 163576 [details] [review]
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly

We can get into a scenario what a user cannot stay logged in for more than a single page load.
If AutoLocation is enabled with branch IP addresses being set to a space, you will be logged out with every page load.

Test Plan:
1) Set your branch ip to a space
2) Enable AutoLocation
3) Restart all the things!
4) Log out
5) Log in
6) Browse to another page
7) You are logged out
8) Apply patch
9) Repeat 1-6
10) You are not logged out!
Comment 3 Kyle M Hall 2024-03-20 19:35:32 UTC
I think maybe a future enhancement would be to validate the branch ip when it is  saved.
Comment 4 Andrew Fuerste-Henry 2024-03-22 15:44:28 UTC
Created attachment 163716 [details] [review]
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly

We can get into a scenario what a user cannot stay logged in for more than a single page load.
If AutoLocation is enabled with branch IP addresses being set to a space, you will be logged out with every page load.

Test Plan:
1) Set your branch ip to a space
2) Enable AutoLocation
3) Restart all the things!
4) Log out
5) Log in
6) Browse to another page
7) You are logged out
8) Apply patch
9) Repeat 1-6
10) You are not logged out!

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Comment 5 Martin Renvoize 2024-05-13 10:19:42 UTC
Created attachment 166625 [details] [review]
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly

We can get into a scenario what a user cannot stay logged in for more than a single page load.
If AutoLocation is enabled with branch IP addresses being set to a space, you will be logged out with every page load.

Test Plan:
1) Set your branch ip to a space
2) Enable AutoLocation
3) Restart all the things!
4) Log out
5) Log in
6) Browse to another page
7) You are logged out
8) Apply patch
9) Repeat 1-6
10) You are not logged out!

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2024-05-13 10:20:43 UTC
I agree.. it would be great to validate this field at a later date and I'm glad to see there's a bug report for that now too.

For now, however, this catches the case and resolves the misconfiguration issue.

Passing QA
Comment 7 Katrin Fischer 2024-05-14 13:35:16 UTC
Pushed for 24.05!

Well done everyone, thank you!