Bug 16429 - Going to circulation from notice triggers may change logged in branch
Summary: Going to circulation from notice triggers may change logged in branch
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-03 10:28 UTC by Kyle M Hall
Modified: 2016-12-05 21:25 UTC (History)
3 users (show)

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


Attachments
Bug 16429 - Going to circulation from notice triggers may change logged in branch (1.77 KB, patch)
2016-05-03 10:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16429 - Fix root problem (4.95 KB, patch)
2016-05-03 10:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16429 - Fix root problem (5.20 KB, patch)
2016-05-03 10:51 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16429 - Fix root problem (6.97 KB, patch)
2016-05-03 10:56 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16429 - Going to circulation from notice triggers may change logged in branch (1.96 KB, patch)
2016-05-03 12:43 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16429 - Fix root problem (7.11 KB, patch)
2016-05-03 12:44 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16429 - Going to circulation from notice triggers may change logged in branch (2.00 KB, patch)
2016-05-03 14:00 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 16429 - Fix root problem (7.15 KB, patch)
2016-05-03 14:00 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 16429 - Going to circulation from notice triggers may change logged in branch (2.07 KB, patch)
2016-05-04 16:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16429 - Fix root problem (7.22 KB, patch)
2016-05-04 16:04 UTC, Jonathan Druart
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 2016-05-03 10:28:39 UTC
If you edit notice triggers and then use the "Checko out" tab from the top bar, you may change your logged in library by accident!

To reproduce:
1) Disable the system preference CircAutocompl
2) Go to the notice triggers
3) Select the triggers for a library other than the one you logged in as
4) Use the "Check out" tab at the top to check out to a patron
5) Note your logged in branch has changed ( you'll need to refresh the page if the check out search took you directly to one patron ).
Comment 1 Kyle M Hall 2016-05-03 10:49:21 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2016-05-03 10:49:28 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2016-05-03 10:51:40 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2016-05-03 10:56:36 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2016-05-03 12:43:36 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2016-05-03 12:44:35 UTC Comment hidden (obsolete)
Comment 7 Nicole C. Engard 2016-05-03 14:00:21 UTC Comment hidden (obsolete)
Comment 8 Nicole C. Engard 2016-05-03 14:00:27 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2016-05-04 16:03:47 UTC
Created attachment 51194 [details] [review]
Bug 16429 - Going to circulation from notice triggers may change logged in branch

If you edit notice triggers and then use the "Checko out" tab from the
top bar, you may change your logged in library by accident!

Test Plan:
1) Disable the system preference CircAutocompl
2) Go to the notice triggers
3) Select the triggers for a library other than the one you logged in as
4) Use the "Check out" tab at the top to check out to a patron
5) Note your logged in branch has changed ( you'll need to refresh the
    page if the check out search took you directly to one patron ).
6) Apply this patch
7) Repeat steps 2-4
8) Note the branch no longer changes

Tested with both patches applied. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Heather Braum <hbraum@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2016-05-04 16:04:11 UTC
Good catch Kyle!
Comment 11 Jonathan Druart 2016-05-04 16:04:25 UTC
Created attachment 51195 [details] [review]
Bug 16429 - Fix root problem

The root of this issue is old code in circulation.pl that is no longer
needed and leaves the affected scripts open to future regressions.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Heather Braum <hbraum@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Kyle M Hall 2016-05-05 10:21:49 UTC
Pushed to master for 16.05!
Comment 13 Julian Maurice 2016-05-16 11:46:39 UTC
Patch pushed to 3.22.x, will be in 3.22.7