[Bug 27148] New: Internal Server Error during self registration 20.11
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Bug ID: 27148 Summary: Internal Server Error during self registration 20.11 Change sponsored?: --- Product: Koha Version: 20.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: jan.michael.mueck@uni-hamburg.de QA Contact: testopia@bugs.koha-community.org Internal Server Error during self registration if categorycode is checked in PatronSelfRegistrationBorrowerUnwantedField. Error could be reproduced. Installation was updated from 19.05 where is worked fine. IRC Chat: [14:20] <Guest7457> Hello, i just updatet to 20.11. and try to register a new patreon in opac. Upon submitting the form i get an internal server error. Plack-Error.log shows "[You must provide a patron's category to validate password's strength and length]". In the Form there is a message to provide a password with undefind lenght. In the administrator setting the passwor lenght is defindet as 4 letters minimum. Can anyone help? [14:31] <cait1> do you have patron categories defiend in your system? is the field hidden from the patron form maybe? [15:12] <Guest7457> @cait1 We have got some categorys defined but can you tell me where i can check the visibility setting? The setup worked fine before the update btw. [15:12] <huginn> Guest7457: I'll give you the answer just as soon as RDA is ready [15:12] <wahanui> i already had it that way, huginn. [15:18] <Joubu> Guest7457: can you open a bug report please? [15:18] <Joubu> I do recreate the problem if PatronSelfRegistrationBorrowerUnwantedField contains "categorycode" About Koha: Koha-Version: 20.11.00.000 OS Version ('uname -a'): Linux www2 5.4.0-54-generic #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64 Perl Interpreter: /usr/bin/perl Perl-Version: 5.030000 Perl @INC: /usr/share/koha/lib /usr/share/koha/installer /usr/share/koha/lib/installer /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/testothek/plugins MySQL-Version: mysql Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 Apache-Version: Server version: Apache/2.4.41 (Ubuntu) PSGI: Plack (deployment) Memcached: Server: 127.0.0.1:11211 | Namespace: koha_testothek | Status: wird ausgeführt. | Konfiguration gelesen aus: koha-conf.xml Zebraversion: Zebra 2.1.4 (C) 1994-2017, Index Data Zebra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. SHA1 ID: 45c729bb18ecdd3e0455f47765700b1c9754b1ce Using ICU Message Broker: Status: wird ausgeführt Datum und Zeit: 03.12.2020 15:28 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 27147 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |agustinmoyano@theke.io Keywords| |rel_20_11_candidate Version|20.11 |master Status|NEW |ASSIGNED Depends on| |23816 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23816 [Bug 23816] Allow to have different password strength and length settings for different patron categories -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 --- Comment #2 from Agustín Moyano <agustinmoyano@theke.io> --- This bug started because password strength and length now it's defined by patron's category. As Jonathan told me, we've got PatronSelfRegistrationDefaultCategory preference. So I believe we should check if a patron category is visible in the form. If not visible, we should check fi PatronSelfRegistrationDefaultCategory is set with a valid patron category, and get password requirements from it. If PatronSelfRegistrationDefaultCategory is not set, then we should fetch system's default password strength and length -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |critical -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Agustín Moyano from comment #2)
If PatronSelfRegistrationDefaultCategory is not set, then we should fetch system's default password strength and length
The self registration feature is disabled is this pref is not set. So we don't need to take this case into account. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 --- Comment #4 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 114154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114154&action=edit Bug 27148: Fix bug on self registration when user category is hidden This patch fixes the bug when there is no patron category available for selection in self registration form. It uses PatronSelfRegistrationDefaultCategory to get patron's password length and strength. To test: 1. Do not apply this patch 2. Allow SeflRegistration, set PatronSelfRegistrationDefaultCategory to a valid patron category and finally add categorycode to PatronSelfRegistrationBorrowerUnwantedField 3. Go to opac and enter self registration form CHECK => There is no patron category available for selection => Password's info alert shows "Password must contain at least undefined characters" 4. Fill the form setting a password and send. CHECH => You get an exception saying "You must provide a patron's category to validate password's strength and length" 5. Apply this patch and restart_all 6. repeat steps 3 and 4 SUCCESS => Password's info alert message shows a number instead of "undefined" => Password's strength and length checks are working => If you change default category's lenght or strength parameter it get's reflected when you refresh the page => When you click send, patron is saved -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114154|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 114161 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114161&action=edit Bug 27148: Fix bug on self registration when user category is hidden This patch fixes the bug when there is no patron category available for selection in self registration form. It uses PatronSelfRegistrationDefaultCategory to get patron's password length and strength. To test: 1. Do not apply this patch 2. Allow PatronSelfRegistration, set PatronSelfRegistrationDefaultCategory to a valid patron category and finally add categorycode to PatronSelfRegistrationBorrowerUnwantedField 3. Go to opac and enter self registration form CHECK => There is no patron category available for selection => Password's info alert shows "Password must contain at least undefined characters" 4. Fill the form setting a password and send. CHECH => You get an exception saying "You must provide a patron's category to validate password's strength and length" 5. Apply this patch and restart_all 6. repeat steps 3 and 4 SUCCESS => Password's info alert message shows a number instead of "undefined" => Password's strength and length checks are working => If you change default category's lenght or strength parameter it get's reflected when you refresh the page => When you click submit, patron is saved Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #6 from David Nind <david@davidnind.com> --- Notes from testing (koha-testing-docker (KTD)): - Step 2: should be PatronSelfRegistration rather than SeflRegistration, is set to allow by default in KTD; PatronSelfRegistrationDefaultCategory is set to SELFREG as the patron category in KTD - Step 6: . to change the password settings for the patron category go to Administration > Patrons and circulation > Patron category and edit the SELFREG category; combinations of settings to experiment with are Minimum password length and Require strong password . system preferences for password security are minPasswordLength and RequireStrongPassword Everything works as expected with the test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 --- Comment #7 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to David Nind from comment #6)
Notes from testing (koha-testing-docker (KTD)):
- Step 2: should be PatronSelfRegistration rather than SeflRegistration, is set to allow by default in KTD; PatronSelfRegistrationDefaultCategory is set to SELFREG as the patron category in KTD
- Step 6: . to change the password settings for the patron category go to Administration > Patrons and circulation > Patron category and edit the SELFREG category; combinations of settings to experiment with are Minimum password length and Require strong password . system preferences for password security are minPasswordLength and RequireStrongPassword
Everything works as expected with the test plan.
Thanks David for this comments, and testing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114161|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 114235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114235&action=edit Bug 27148: Fix bug on self registration when user category is hidden This patch fixes the bug when there is no patron category available for selection in self registration form. It uses PatronSelfRegistrationDefaultCategory to get patron's password length and strength. To test: 1. Do not apply this patch 2. Allow SeflRegistration, set PatronSelfRegistrationDefaultCategory to a valid patron category and finally add categorycode to PatronSelfRegistrationBorrowerUnwantedField 3. Go to opac and enter self registration form CHECK => There is no patron category available for selection => Password's info alert shows "Password must contain at least undefined characters" 4. Fill the form setting a password and send. CHECH => You get an exception saying "You must provide a patron's category to validate password's strength and length" 5. Apply this patch and restart_all 6. repeat steps 3 and 4 SUCCESS => Password's info alert message shows a number instead of "undefined" => Password's strength and length checks are working => If you change default category's lenght or strength parameter it get's reflected when you refresh the page => When you click send, patron is saved Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as expected, no regressions found, passes QA scripts. Passing QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes a bug when using release notes| |self registration and there | |is no patron category | |available for selection in | |the registration form. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- + var require_strong = $('select#borrower_categorycode option:selected').data('pwdStrong')||default_strong_password; This does not work if the category does not have "Require strong password". If the default from syspref is 1, require_strong will always be 1. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Agustín Moyano <agustinmoyano@theke.io> 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=27148 --- Comment #11 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 114290 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114290&action=edit Bug 27148: (follow-up) Fix require_strong variable set -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114235|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 114563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114563&action=edit Bug 27148: Fix bug on self registration when user category is hidden This patch fixes the bug when there is no patron category available for selection in self registration form. It uses PatronSelfRegistrationDefaultCategory to get patron's password length and strength. To test: 1. Do not apply this patch 2. Allow SeflRegistration, set PatronSelfRegistrationDefaultCategory to a valid patron category and finally add categorycode to PatronSelfRegistrationBorrowerUnwantedField 3. Go to opac and enter self registration form CHECK => There is no patron category available for selection => Password's info alert shows "Password must contain at least undefined characters" 4. Fill the form setting a password and send. CHECH => You get an exception saying "You must provide a patron's category to validate password's strength and length" 5. Apply this patch and restart_all 6. repeat steps 3 and 4 SUCCESS => Password's info alert message shows a number instead of "undefined" => Password's strength and length checks are working => If you change default category's lenght or strength parameter it get's reflected when you refresh the page => When you click send, patron is saved Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114290|0 |1 is obsolete| | --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 114564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114564&action=edit Bug 27148: (follow-up) Fix require_strong variable set -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 114565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114565&action=edit Bug 27148: (QA follow-up) Calculate default_strong_password correctly Fix a typo lenght for length If category strong password is not set, then we fall back to the preference, but that can be "" - which should be treated as 0 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Nick Clemens <nick@bywatersolutions.com> 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=27148 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.01 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Missing dependencies, not backported to 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27626 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27148 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org