[Bug 21087] New: Patron's password is hashed twice when the object is saved
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Bug ID: 21087 Summary: Patron's password is hashed twice when the object is saved Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 20287 When a patron is edited (reading the code at least using patron batch modification), the password is lost. Prior to bug 20287 ModMember took the $hash of modification, and '****' was a trick to not update the password (when coming from memberentry). The same trick has been reused for the move of ModMember to Koha::Patron->store, but then the following code will modify the password of the patron: my $password = 'password'; $patron->password($password)->store; $patron->surname('xxx')->store; => User is not longer able to login with 'password' Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20287 [Bug 20287] Move AddMember and ModMember to Koha::Patron -- 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=21087 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Highlighted by Jenkins with t/db_dependent/selenium/authentication.t # Failed test 'Patron with flags catalogue should be able to login' # at t/db_dependent/selenium/authentication.t line 63. Wide character in print at /usr/local/share/perl/5.20.2/Test2/Formatter/TAP.pm line 105. # 'Koha › Invalid username or password Log in to Koha' # doesn't match '(?^u:Koha staff client)' -- 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=21087 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77095&action=edit Bug 21087: Test to describe the issue -- 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=21087 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77096&action=edit Bug 21087: Hash passwords in ->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=21087 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Late here, I do not know if it's enough. Could someone take a look? -- 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=21087 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Test plan: Create patron, edit, change password (staff and opac), use the password recovery as well as the self registration features. Everything must behave as usual. -- 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=21087 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- 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=21087 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77095|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77200&action=edit Bug 21087: Test to describe the issue Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77096|0 |1 is obsolete| | --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77201&action=edit Bug 21087: Hash passwords in ->update_password Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Tomás Cohen Arazi <tomascohen@gmail.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=21087 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77254 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77254&action=edit Bug 21087: Fix one wrong call -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77255&action=edit Bug 21087: Do not store the password in ->store for existing patrons When ->store is called on an existing patron we must not save the password, but keep the one in DB instead. There is a dedicated method (update_password) to call when the password need to be updated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77273 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77273&action=edit Bug 21087: Fix create_superlibrarian.pl script -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Kyle M Hall <kyle@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=21087 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77200|0 |1 is obsolete| | Attachment #77201|0 |1 is obsolete| | Attachment #77254|0 |1 is obsolete| | Attachment #77255|0 |1 is obsolete| | Attachment #77273|0 |1 is obsolete| | --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 77284 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77284&action=edit Bug 21087: Test to describe the issue Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: John Doe <you@example.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 77285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77285&action=edit Bug 21087: Hash passwords in ->update_password Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: John Doe <you@example.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 77286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77286&action=edit Bug 21087: Fix one wrong call Signed-off-by: John Doe <you@example.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 77287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77287&action=edit Bug 21087: Do not store the password in ->store for existing patrons When ->store is called on an existing patron we must not save the password, but keep the one in DB instead. There is a dedicated method (update_password) to call when the password need to be updated Signed-off-by: John Doe <you@example.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 77288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77288&action=edit Bug 21087: Fix create_superlibrarian.pl script Signed-off-by: John Doe <you@example.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Kyle, something's odd about the sign-off line ;) Signed-off-by: John Doe <you@example.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77327 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77327&action=edit Bug 21087: (QA follow-up) Fix usage in create_superlibrarian.pl Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 18.11, thanks all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Now John Doe will have a sign off in release notes ;D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21133 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21133 [Bug 21133] Missing use C4::Account statement in Koha/Patron.pm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Bug 21087 depends on bug 20287, which changed state. Bug 20287 Summary: Move AddMember and ModMember to Koha::Patron https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20287 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=21087 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Caused by bug 20287 which is not in 18.05.x series. Marking RESOLVED FIXED. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21087 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36449 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36449 [Bug 36449] Patron->store falls back to stored password when modifying patron -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org