[Bug 22048] New: Use set_password instead of update_password in the codebase
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Bug ID: 22048 Summary: Use set_password instead of update_password in the codebase Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- update_password has been deprecated and will be removed by bug 21992. We need to switch all the uses in the codebase into using set_password. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22047 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22047 [Bug 22047] set_password should have a 'skip_validation' param -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21547 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21547 [Bug 21547] Use set_password in opac-passwd and remove sub goodkey -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21992 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21992 [Bug 21992] Remove Koha::Patron::update_password -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83501 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83501&action=edit Bug 22048: Use set_password in onboarding.pl To test, verify the onboarding process sets the password correctly. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83502&action=edit Bug 22048: Use set_password in member-password.pl This patch makes member-password.pl use $patron->set_password instead of update_password. The side effect is that setting password and userid become separate steps in the code. For the password all the initial checks are the same, but password strength is checked on calling set_password and an exception is thrown. So instead of checking the password quality, we just wait for exceptions and behave the same as before. Bonus: you will notice I reused the initially fetched $patron object. Things get simpler :-D To test: - Verify that changing the password / userid for a patron works as usual -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83503&action=edit Bug 22048: Use set_password in memberentry.pl To test: - Verify that changing the password and userid of a patron by globally editing they works, -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83504&action=edit Bug 22048: Use set_password in create_superlibrarian.pl Use $patron->set_password instead of update_password. In this case the 'skip_validation' param needs to be set as no password strength checks are expected. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83505&action=edit Bug 22048: Use set_password opac/opac-password-recovery.pl -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83506&action=edit Bug 22048: Use set_password in tests To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Auth.t \ t/db_dependent/Koha/Patrons.t \ t/db_dependent/Search/History.t \ t/db_dependent/selenium/authentication.t \ t/db_dependent/selenium/regressions.t => SUCCESS: Tests pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83507 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83507&action=edit Bug 22048: Use set_password in Auth_with_ldap.pm -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Kyle M Hall <kyle@bywatersolutions.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=22048 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83501|0 |1 is obsolete| | Attachment #83502|0 |1 is obsolete| | Attachment #83503|0 |1 is obsolete| | Attachment #83504|0 |1 is obsolete| | Attachment #83505|0 |1 is obsolete| | Attachment #83506|0 |1 is obsolete| | Attachment #83507|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83585 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83585&action=edit Bug 22048: Use set_password in onboarding.pl To test, verify the onboarding process sets the password correctly. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83586 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83586&action=edit Bug 22048: Use set_password in member-password.pl This patch makes member-password.pl use $patron->set_password instead of update_password. The side effect is that setting password and userid become separate steps in the code. For the password all the initial checks are the same, but password strength is checked on calling set_password and an exception is thrown. So instead of checking the password quality, we just wait for exceptions and behave the same as before. Bonus: you will notice I reused the initially fetched $patron object. Things get simpler :-D To test: - Verify that changing the password / userid for a patron works as usual Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83587 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83587&action=edit Bug 22048: Use set_password in memberentry.pl To test: - Verify that changing the password and userid of a patron by globally editing they works, Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83588&action=edit Bug 22048: Use set_password in create_superlibrarian.pl Use $patron->set_password instead of update_password. In this case the 'skip_validation' param needs to be set as no password strength checks are expected. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83589&action=edit Bug 22048: Use set_password opac/opac-password-recovery.pl Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83590&action=edit Bug 22048: Use set_password in tests To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Auth.t \ t/db_dependent/Koha/Patrons.t \ t/db_dependent/Search/History.t \ t/db_dependent/selenium/authentication.t \ t/db_dependent/selenium/regressions.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83591 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83591&action=edit Bug 22048: Use set_password in Auth_with_ldap.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Josef Moravec <josef.moravec@gmail.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=22048 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83585|0 |1 is obsolete| | Attachment #83586|0 |1 is obsolete| | Attachment #83587|0 |1 is obsolete| | Attachment #83588|0 |1 is obsolete| | Attachment #83589|0 |1 is obsolete| | Attachment #83590|0 |1 is obsolete| | Attachment #83591|0 |1 is obsolete| | --- Comment #15 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83597&action=edit Bug 22048: Use set_password in onboarding.pl To test, verify the onboarding process sets the password correctly. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #16 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83598&action=edit Bug 22048: Use set_password in member-password.pl This patch makes member-password.pl use $patron->set_password instead of update_password. The side effect is that setting password and userid become separate steps in the code. For the password all the initial checks are the same, but password strength is checked on calling set_password and an exception is thrown. So instead of checking the password quality, we just wait for exceptions and behave the same as before. Bonus: you will notice I reused the initially fetched $patron object. Things get simpler :-D To test: - Verify that changing the password / userid for a patron works as usual Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #17 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83599 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83599&action=edit Bug 22048: Use set_password in memberentry.pl To test: - Verify that changing the password and userid of a patron by globally editing they works, Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #18 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83600 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83600&action=edit Bug 22048: Use set_password in create_superlibrarian.pl Use $patron->set_password instead of update_password. In this case the 'skip_validation' param needs to be set as no password strength checks are expected. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #19 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83601 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83601&action=edit Bug 22048: Use set_password opac/opac-password-recovery.pl Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #20 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83602 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83602&action=edit Bug 22048: Use set_password in tests To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Auth.t \ t/db_dependent/Koha/Patrons.t \ t/db_dependent/Search/History.t \ t/db_dependent/selenium/authentication.t \ t/db_dependent/selenium/regressions.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 --- Comment #21 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 83603 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83603&action=edit Bug 22048: Use set_password in Auth_with_ldap.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Bug 22048 depends on bug 21547, which changed state. Bug 21547 Summary: Use set_password in opac-passwd and remove sub goodkey https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21547 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #22 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED CC| |martin.renvoize@ptfs-europe | |.com --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement, will not be backported at this time to 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22048 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22559 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22559 [Bug 22559] OPAC Forgotten password functionality not working -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org