Bugzilla – Attachment 20254 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]
Bug 9611: Database update, changing password from varchar(30) to varchar(60)
Bug-9611-Database-update-changing-password-from-va.patch (text/plain), 2.18 KB, created by
Galen Charlton
on 2013-08-09 22:56:09 UTC
(
hide
)
Description:
Bug 9611: Database update, changing password from varchar(30) to varchar(60)
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2013-08-09 22:56:09 UTC
Size:
2.18 KB
patch
obsolete
>From c0fe0ed88201323fcf785ed90d6682cd7da7c852 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chris@bigballofwax.co.nz> >Date: Sun, 17 Feb 2013 08:22:07 +1300 >Subject: [PATCH] Bug 9611: Database update, changing password from > varchar(30) to varchar(60) > >This is necessary because Bcrypt hashes are longer than MD5 hashes. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Signed-off-by: Mason James <mtj@kohaaloha.com> >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 7 +++++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8a8b70f..b9d6628 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -246,7 +246,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons > `ethnicity` varchar(50) default NULL, -- unused in Koha > `ethnotes` varchar(255) default NULL, -- unused in Koha > `sex` varchar(1) default NULL, -- patron/borrower's gender >- `password` varchar(30) default NULL, -- patron/borrower's encrypted password >+ `password` varchar(60) default NULL, -- patron/borrower's encrypted password > `flags` int(11) default NULL, -- will include a number associated with the staff member's permissions > `userid` varchar(75) default NULL, -- patron/borrower's opac and/or staff client log in > `opacnote` mediumtext, -- a note on the patron/borrower's account that is visible in the OPAC and staff client >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 74aeb3e..5274045 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7067,6 +7067,13 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.11.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("ALTER TABLE borrowers CHANGE password password VARCHAR(60);"); >+ print "Upgrade to $DBversion done (Bug 9611 upgrading password storage system)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.10.4
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