Bugzilla – Attachment 15522 Details for
Bug 9611
Changing the password hashing algorithm from MD5 to more secure Bcrypt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Followup Bug 9611 - Changing the password hashing algorithm
Followup-Bug-9611---Changing-the-password-hashing-.patch (text/plain), 2.72 KB, created by
Mason James
on 2013-02-19 04:37:15 UTC
(
hide
)
Description:
Followup Bug 9611 - Changing the password hashing algorithm
Filename:
MIME Type:
Creator:
Mason James
Created:
2013-02-19 04:37:15 UTC
Size:
2.72 KB
patch
obsolete
>From 420290779d26e3f75df844a3adbca22c0880e6fe Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Tue, 19 Feb 2013 00:13:10 -0300 >Subject: [PATCH] Followup Bug 9611 - Changing the password hashing algorithm >Content-Type: text/plain; charset="utf-8" >http://koha-community.org > >Fixes tabulations > >Signed-off-by: Mason James <mtj@kohaaloha.com> >--- > C4/Members.pm | 16 ++++++++-------- > 1 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index c672962..9aab14a 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -249,7 +249,7 @@ sub Search { > $filter = [ $filter ]; > push @$filter, {"borrowernumber"=>$matching_records}; > } >- } >+ } > } > > # $showallbranches was not used at the time SearchMember() was mainstreamed into Search(). >@@ -284,7 +284,7 @@ sub Search { > } > $searchtype ||= "start_with"; > >- return SearchInTable( "borrowers", $filter, $orderby, $limit, $columns_out, $search_on_fields, $searchtype ); >+ return SearchInTable( "borrowers", $filter, $orderby, $limit, $columns_out, $search_on_fields, $searchtype ); > } > > =head2 GetMemberDetails >@@ -722,7 +722,7 @@ sub ModMember { > $data{password} = hash_password($data{password}); > } > } >- my $execute_success=UpdateInTable("borrowers",\%data); >+ my $execute_success=UpdateInTable("borrowers",\%data); > if ($execute_success) { # only proceed if the update was a success > # ok if its an adult (type) it may have borrowers that depend on it as a guarantor > # so when we update information for an adult we should check for guarantees and update the relevant part >@@ -772,11 +772,11 @@ sub AddMember { > $data{'borrowernumber'}=InsertInTable("borrowers",\%data); > > >- # generate a proper login if none provided >- $data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq ''; >- # create a disabled account if no password provided >- $data{'password'} = ($data{'password'})? hash_password($data{'password'}) : '!'; >- $data{'borrowernumber'}=InsertInTable("borrowers",\%data); >+ # generate a proper login if none provided >+ $data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq ''; >+ # create a disabled account if no password provided >+ $data{'password'} = ($data{'password'})? hash_password($data{'password'}) : '!'; >+ $data{'borrowernumber'}=InsertInTable("borrowers",\%data); > # mysql_insertid is probably bad. not necessarily accurate and mysql-specific at best. > logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog"); > >-- >1.7.2.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 9611
:
15311
|
15427
|
15428
|
15429
|
15505
|
15506
|
15507
|
15508
|
15509
|
15510
|
15514
|
15515
|
15516
|
15517
|
15518
|
15519
|
15520
|
15521
|
15522
|
17203
|
17204
|
20252
|
20253
|
20254
|
20255
|
20576
|
20577
|
20578
|
20621
|
20622
|
20623
|
20624
|
21614
|
21615
|
21621
|
21622
|
21623
|
21624
|
21625
|
21626
|
21627
|
21628
|
21767
|
21768
|
21769
|
21770
|
21771
|
21772
|
21775
|
21776
|
21777
|
21789
|
21790
|
21791
|
21792
|
21793
|
21794
|
21795
|
21796