[Bug 6804] New: If IndependantBranches and AutoLocation enabled, OPAC login does not redirect properly outside IP range
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Bug #: 6804 Summary: If IndependantBranches and AutoLocation enabled, OPAC login does not redirect properly outside IP range Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_6 Platform: All OS/Version: All Status: ASSIGNED Severity: minor Priority: P5 Component: Authentication AssignedTo: ian.walls@bywatersolutions.com ReportedBy: ian.walls@bywatersolutions.com QAContact: koha-bugs@lists.koha-community.org CC: dpavlin@rot13.org In the event that a library has IndependantBranches turned on, as well as AutoLocation turned on and valid IP ranges in place for their branches, the OPAC login will not redirect to the My Summary area; it will instead show another login prompt. The login is indeed successful, and if the patron navigates to other pages, they will find the link to their account in the upper right corner as normal, but this initial prompt is VERY discouraging. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 --- Comment #1 from Ian Walls <ian.walls@bywatersolutions.com> 2011-08-29 16:06:56 UTC --- Created attachment 5214 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5214 Proposed Patch AutoLocation should only apply to the staff client login, but when IndependantBranches was activated, it applied to the OPAC login, as well. Login was not prevented, but the patron was greeted with another login prompt, instead of the My Summary page. Very confusing. This patch adds a check for whether this is an OPAC login before executing the particular code that was causing this. To test: 1. Enable IndependantBranches & AutoLocation (be sure your branches have IP ranges configured!) 2. Select a staff account, and note the branch 3. Attempt to login to the staff client from within the IP range for the branch: this should work 4. Attempt to login to the staff client from outside the IP range: this should be blocked 5. Attempt to login to the OPAC from within the IP range: this should work 6. Attempt to login to the OPAC from outside the IP range: this should also work -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5214|0 |1 is obsolete| | --- Comment #2 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> 2011-11-04 13:30:21 UTC --- Created attachment 6198 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6198 [SIGNED-OFF] Bug 6804: if IndependantBranches & AutoLocation, OPAC login redirect fails AutoLocation should only apply to the staff client login, but when IndependantBranches was activated, it applied to the OPAC login, as well. Login was not prevented, but the patron was greeted with another login prompt, instead of the My Summary page. Very confusing. This patch adds a check for whether this is an OPAC login before executing the particular code that was causing this. To test: 1. Enable IndependantBranches & AutoLocation (be sure your branches have IP ranges configured!) 2. Select a staff account, and note the branch 3. Attempt to login to the staff client from within the IP range for the branch: this should work 4. Attempt to login to the staff client from outside the IP range: this should be blocked 5. Attempt to login to the OPAC from within the IP range: this should work 6. Attempt to login to the OPAC from outside the IP range: this should also work Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sophie.meynieux@biblibre.co | |m --- Comment #3 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> 2011-11-04 13:40:35 UTC --- I have tested this patch as described. As my koha server is local, the IP address I have to authorize for the site was 127.0.0.1 Laurent Ducos draws our attention on the fact that this IP check can be easily bypassed by IP spoofing -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Version|rel_3_6 |master QAContact|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
From a QA standpoint, I do not like it that the code here takes its regex here
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Failed QA --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-12-05 09:43:16 UTC --- QA Comment: I did not test this patch, but have some comments on the code that is not directly touched by this patch but is in the direct context. I think that the check if ($ip !~ /^$domain/) does not work. If domain is a full IP address it works. But if domain is a subnet mask like 199.1.*, the check will also approve addresses like 199.11.12.13 which it should not (.* will `eat` 1.12.13). directly from the database. The point in the database column is not meant as a regex wildcard. My recommendation therefore is that this patch should also correct this regex, since it directly deals with the if-condition on top of it. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=3068 --- Comment #5 from Ian Walls <ian.walls@bywatersolutions.com> 2011-12-05 14:45:56 UTC --- Adding See Also link to bug 3068 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looks like this has completely fallen off the radar... do we know if it's still a bug in current master? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6804 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org