Bugzilla – Attachment 94906 Details for
Bug 22706
Add plugin hooks to allow custom password strength checking modules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22706: (RM follow-up) Restore ability to create disabled accounts
Bug-22706-RM-follow-up-Restore-ability-to-create-d.patch (text/plain), 2.36 KB, created by
Martin Renvoize
on 2019-10-31 11:24:03 UTC
(
hide
)
Description:
Bug 22706: (RM follow-up) Restore ability to create disabled accounts
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2019-10-31 11:24:03 UTC
Size:
2.36 KB
patch
obsolete
>From 1d54596bd3edd296061cdb5526d17eb266e6939d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 31 Oct 2019 10:50:07 +0000 >Subject: [PATCH] Bug 22706: (RM follow-up) Restore ability to create disabled > accounts > >The patchset inadvertantly disabled the ability to create disabled user >accounts when any check_password plugin was installed. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron.pm | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 2b079af390..55855247e9 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -224,11 +224,11 @@ sub store { > : undef; > $self->privacy($default_privacy); > >- # Make a copy of the plain text password for later use >- $self->plain_text_password( $self->password ); >- >- if ( C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins") ) { >- # Call any check_password plugins >+ # Call any check_password plugins if password is passed >+ if ( C4::Context->preference('UseKohaPlugins') >+ && C4::Context->config("enable_plugins") >+ && $self->password ) >+ { > my @plugins = Koha::Plugins->new()->GetPlugins({ > method => 'check_password', > }); >@@ -238,7 +238,7 @@ sub store { > # borrowernumber to the plugin. > my $ret = $plugin->check_password( > { >- password => $self->plain_text_password, >+ password => $self->password, > borrowernumber => $self->borrowernumber > } > ); >@@ -248,6 +248,9 @@ sub store { > } > } > >+ # Make a copy of the plain text password for later use >+ $self->plain_text_password( $self->password ); >+ > # Create a disabled account if no password provided > $self->password( $self->password > ? Koha::AuthUtils::hash_password( $self->password ) >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22706
:
93488
|
93526
|
94613
|
94614
|
94672
|
94673
|
94674
|
94675
|
94905
| 94906 |
94907
|
94910