Bugzilla – Attachment 132143 Details for
Bug 28786
Two-factor authentication for staff client - TOTP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28786: Add new DB column borrowers.secret
Bug-28786-Add-new-DB-column-borrowerssecret.patch (text/plain), 3.48 KB, created by
Jonathan Druart
on 2022-03-24 13:29:49 UTC
(
hide
)
Description:
Bug 28786: Add new DB column borrowers.secret
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-03-24 13:29:49 UTC
Size:
3.48 KB
patch
obsolete
>From 9bd2a2cad63f94863781d1b25af5e9e4863116e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 29 Jul 2021 15:12:49 +0200 >Subject: [PATCH] Bug 28786: Add new DB column borrowers.secret > >Sponsored-by: Orex Digital > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/two-fa.perl | 12 ++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 14 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/two-fa.perl b/installer/data/mysql/atomicupdate/two-fa.perl >index 25896b62016..5d62189b1cc 100644 >--- a/installer/data/mysql/atomicupdate/two-fa.perl >+++ b/installer/data/mysql/atomicupdate/two-fa.perl >@@ -6,5 +6,17 @@ if( CheckVersion( $DBversion ) ) { > ('TwoFactorAuthentication', '0', 'NULL', 'Enables two-factor authentication', 'YesNo') > }); > >+ if( !column_exists( 'borrowers', 'secret' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE borrowers ADD COLUMN `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA' AFTER `password` >+ }); >+ } >+ >+ if( !column_exists( 'deletedborrowers', 'secret' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE deletedborrowers ADD COLUMN `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA' AFTER `password` >+ }); >+ } >+ > NewVersion( $DBversion, 28786, "Add new syspref TwoFactorAuthentication"); > } >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 69b36139636..bcfdfde2e09 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1425,6 +1425,7 @@ CREATE TABLE `borrowers` ( > `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor', > `sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender', > `password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s Bcrypt encrypted password', >+ `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA', > `flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions', > `userid` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s opac and/or staff interface log in', > `opacnote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is visible in the OPAC and staff interface', >@@ -2433,6 +2434,7 @@ CREATE TABLE `deletedborrowers` ( > `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor', > `sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender', > `password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s encrypted password', >+ `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA', > `flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions', > `userid` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s opac and/or staff interface log in', > `opacnote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is visible in the OPAC and staff interface', >-- >2.25.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 28786
:
123375
|
123376
|
123377
|
123378
|
123379
|
123380
|
123381
|
123397
|
123398
|
123399
|
123400
|
123401
|
123402
|
123403
|
124569
|
124770
|
124771
|
124844
|
124845
|
124846
|
124847
|
128841
|
128842
|
129383
|
129384
|
129474
|
129521
|
129557
|
129558
|
129559
|
129560
|
129561
|
129562
|
129563
|
129564
|
129565
|
129566
|
129567
|
129568
|
129569
|
129654
|
129655
|
129656
|
129657
|
129658
|
129659
|
129660
|
129661
|
129662
|
129665
|
131940
|
131941
|
131942
|
131943
|
131944
|
131945
|
131946
|
131947
|
131948
|
131949
|
131950
|
131951
|
131952
|
131953
|
131954
|
131955
|
131956
|
131957
|
131958
|
132142
| 132143 |
132144
|
132145
|
132146
|
132147
|
132148
|
132149
|
132150
|
132153
|
132154
|
132155
|
132156
|
132157
|
133222
|
133516
|
133522
|
133531
|
133533
|
133541
|
133548
|
133643
|
133686