Bugzilla – Attachment 5344 Details for
Bug 6854
import_borrowers.pl : Double password encryption on member update if there is no password in the csv and no default password value.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Correct a double password encryption problem in import_borrowers.pl
0001-Correct-a-double-password-encryption-problem-in-impo.patch (text/plain), 1.38 KB, created by
Frédérick Capovilla
on 2011-09-07 18:40:25 UTC
(
hide
)
Description:
Correct a double password encryption problem in import_borrowers.pl
Filename:
MIME Type:
Creator:
Frédérick Capovilla
Created:
2011-09-07 18:40:25 UTC
Size:
1.38 KB
patch
obsolete
>From f9e2e2e10c2e8a9d1023a898a3015851afe7f36d Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= <frederick.capovilla@sys-tech.net> >Date: Wed, 7 Sep 2011 14:15:35 -0400 >Subject: [PATCH] Correct a double password encryption problem in import_borrowers.pl > >When the CSV file has no password column and no default value was set for >the password : >If we try to modify an existing user, the password from the BD is sent >to ModMember, which then encrypts the already-encrypted password a >second time. >--- > tools/import_borrowers.pl | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl >index d953667..a0df310 100755 >--- a/tools/import_borrowers.pl >+++ b/tools/import_borrowers.pl >@@ -239,6 +239,10 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { > for my $col (keys %borrower) { > # use values from extant patron unless our csv file includes this column or we provided a default. > # FIXME : You cannot update a field with a perl-evaluated false value using the defaults. >+ >+ # The password is always encrypted, skip it! >+ next if $col eq 'password'; >+ > unless(exists($csvkeycol{$col}) || $defaults{$col}) { > $borrower{$col} = $member->{$col} if($member->{$col}) ; > } >-- >1.5.6.5 >
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 6854
:
5344
|
6002
|
6064