[Bug 16805] New: Log in with database admin user breaks OPAC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Bug ID: 16805 Summary: Log in with database admin user breaks OPAC Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: mtompset@hotmail.com Reporter: mtompset@hotmail.com QA Contact: testopia@bugs.koha-community.org If a user attempts to log into the OPAC with the database admin account the following is generated: Software error: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [for Statement "SELECT a.*, b.branchcode FROM alert a JOIN borrowers b USING(borrowernumber) WHERE"] at /home/mtompset/kohaclone/C4/Letters.pm line 331. For help, please send mail to the webmaster (webmaster@ubuntu), giving this error message and the time and date of the error. A tweak to the SQL and a warning would be nice, much like the Intranet warns those logging into the staff client with the database admin account. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52762 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52762&action=edit Bug 16805: Log in with database admin user breaks OPAC TEST PLAN --------- 1) Log into OPAC with database admin user. -- see error given in comment #0 2) Apply patch 3) Log into OPAC with database admin user. -- logs in, but gives warning with a nice logout button. 4) run koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52762|0 |1 is obsolete| | --- Comment #2 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 52764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52764&action=edit [SIGNED-OFF]Bug 16805: Log in with database admin user breaks OPAC TEST PLAN --------- 1) Log into OPAC with database admin user. -- see error given in comment #0 2) Apply patch 3) Log into OPAC with database admin user. -- logs in, but gives warning with a nice logout button. 4) run koha qa test tools. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> No kaha qa errors In debian display diferent error: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/DBI.pm line 2054. Works as advertised -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |hector.hecaxmmx@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52827 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52827&action=edit Bug 16805: Add test to getalert (no param passed) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I'd not recommend to give such info on the public interface (You never know what might happen with students). Of course Koha is open source and we could trace back the error message, but... just in case :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52827|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52845 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52845&action=edit Bug 16805: Add test to getalert (no param passed) TEST PLAN --------- 1) apply patch 2) prove t/db_dependent/Letters.t -- fails 3) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52846 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52846&action=edit Bug 16805: Tweak new test message to say getalert It said 'addalert', which is likely a cut-paste typo. Plus, let's keep running the other tests if that one goes bad. TEST PLAN --------- 1) Apply Jonathan's test patch 2) prove t/db_dependent/Letters.t -- dies before finishing tests 3) Apply this test patch 4) prove t/db_dependent/Letters.t -- says 'getalert' -- fails on one test, but keeps going. 5) run koha qa test tools. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52764|0 |1 is obsolete| | --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52847 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52847&action=edit Bug 16805: Log in with database admin user breaks OPAC TEST PLAN --------- 1) Apply Jonathan's test patch 2) prove t/db_dependent/Letters.t -- dies before finishing tests 3) Apply second test patch 4) prove t/db_dependent/Letters.t -- says 'getalert' -- fails on one test, but keeps going. 5) Log into OPAC with database admin user. -- see error given in comment #0 6) Apply this patch 7) prove t/db_dependent/Letters.t -- says 'getalert' -- all tests pass. 8) Log into OPAC with database admin user. -- logs in, but gives warning with a nice logout button. 9) run koha qa test tools. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> No kaha qa errors In debian display diferent error: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/DBI.pm line 2054. Works as advertised NOTE: Revised test plan, as Jonathan added useful test case. Works as I've tested above. Hector tested older test plan which was steps 5,6,8 and 9. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Jonathan Druart from comment #4)
I'd not recommend to give such info on the public interface (You never know what might happen with students). Of course Koha is open source and we could trace back the error message, but... just in case :)
Valid point, but who is going to hand out their database admin account to students?! This is more likely to be administrators (like me) being unwise and logging in with the database admin account. This, however, will be a huge security issue if some administrator somewhere has done this or will do this. So, I could understand QA wanting to revert the opac file changes in the third patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- There is not point to catch the mysql error in the tests. It is going to be fixed by this patchset. The eval is not needed here. (In reply to M. Tompsett from comment #8)
So, I could understand QA wanting to revert the opac file changes in the third patch.
I suggested to replace it with something lighter: "You are not using a valid user". But nevermind, I won't fight ages for that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52845|0 |1 is obsolete| | --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52877&action=edit Bug 16805: Add test to getalert (no param passed) TEST PLAN --------- 1) apply patch 2) prove t/db_dependent/Letters.t -- fails 3) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52846|0 |1 is obsolete| | --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52878 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52878&action=edit Bug 16805: Tweak new test message to say getalert It said 'addalert', which is likely a cut-paste typo. Plus, let's keep running the other tests if that one goes bad. TEST PLAN --------- 1) Apply Jonathan's test patch 2) prove t/db_dependent/Letters.t -- dies before finishing tests 3) Apply this test patch 4) prove t/db_dependent/Letters.t -- still dies before finished tests, 'addalert' now is 'getalert' in message. 5) run koha qa test tools. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52847|0 |1 is obsolete| | --- Comment #12 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52879&action=edit Bug 16805: Log in with database admin user breaks OPAC TEST PLAN --------- 1) Apply Jonathan's test patch 2) prove t/db_dependent/Letters.t -- dies before finishing tests 3) Apply second test patch 4) prove t/db_dependent/Letters.t -- dies before finishing tests -- 'addalert' is changed to 'getalert' 5) Log into OPAC with database admin user. -- see error given in comment #0 6) Apply this patch 7) prove t/db_dependent/Letters.t -- says 'getalert' -- all tests pass. 8) Log into OPAC with database admin user. -- logs in, but gives warning with a nice logout button. 9) run koha qa test tools. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> No kaha qa errors In debian display diferent error: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/DBI.pm line 2054. Works as advertised NOTE: Revised test plan, as Jonathan added useful test case. Works as I've tested above. Hector tested older test plan which was steps 5,6,8 and 9. Revised test plan again while tweaking to address comment #9. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52877|0 |1 is obsolete| | Attachment #52878|0 |1 is obsolete| | Attachment #52879|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52880&action=edit Bug 16805: Add test to getalert (no param passed) TEST PLAN --------- 1) apply patch 2) prove t/db_dependent/Letters.t -- fails 3) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52881 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52881&action=edit Bug 16805: Tweak new test message to say getalert It said 'addalert', which is likely a cut-paste typo. Plus, let's keep running the other tests if that one goes bad. TEST PLAN --------- 1) Apply Jonathan's test patch 2) prove t/db_dependent/Letters.t -- dies before finishing tests 3) Apply this test patch 4) prove t/db_dependent/Letters.t -- still dies before finished tests, 'addalert' now is 'getalert' in message. 5) run koha qa test tools. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52882&action=edit Bug 16805: Log in with database admin user breaks OPAC TEST PLAN --------- 1) Apply Jonathan's test patch 2) prove t/db_dependent/Letters.t -- dies before finishing tests 3) Apply second test patch 4) prove t/db_dependent/Letters.t -- dies before finishing tests -- 'addalert' is changed to 'getalert' 5) Log into OPAC with database admin user. -- see error given in comment #0 6) Apply this patch 7) prove t/db_dependent/Letters.t -- says 'getalert' -- all tests pass. 8) Log into OPAC with database admin user. -- logs in, but gives warning with a nice logout button. 9) run koha qa test tools. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> No kaha qa errors In debian display diferent error: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/DBI.pm line 2054. Works as advertised NOTE: Revised test plan, as Jonathan added useful test case. Works as I've tested above. Hector tested older test plan which was steps 5,6,8 and 9. Revised test plan again while tweaking to address comment #9. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan, Mark! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #17 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.02. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #18 from Julian Maurice <julian.maurice@biblibre.com> --- Patches pushed to 3.22.x, will be in 3.22.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16805 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org