Bugzilla – Attachment 57212 Details for
Bug 17494
Koha generating duplicate self registration tokens
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17494: Make sure the same verification token won't be generated twice
Bug-17494-Make-sure-the-same-verification-token-wo.patch (text/plain), 1.32 KB, created by
Tomás Cohen Arazi
on 2016-11-04 15:32:09 UTC
(
hide
)
Description:
Bug 17494: Make sure the same verification token won't be generated twice
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2016-11-04 15:32:09 UTC
Size:
1.32 KB
patch
obsolete
>From 65e6c533810a0510072402239689a6bdd92430ea Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 27 Oct 2016 10:04:30 +0200 >Subject: [PATCH] Bug 17494: Make sure the same verification token won't be > generated twice > >Well, this patch does not enforce the unique constraint but mimic what >is already done in C4::ImportExportFramework and Koha::Upload where >md5_hex is used. > >Test plan: >Have a look at the code and confirm that it adds more randomness to the >hashed string > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > opac/opac-memberentry.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 685d1ca..6bdd66a 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -138,7 +138,7 @@ if ( $action eq 'create' ) { > ); > $template->param( 'email' => $borrower{'email'} ); > >- my $verification_token = md5_hex( \%borrower ); >+ my $verification_token = md5_hex( time().{}.rand().{}.$$ ); > > $borrower{password} = random_string(".........."); > $borrower{verification_token} = $verification_token; >-- >2.7.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 17494
:
56914
|
56992
|
56993
|
57008
|
57204
|
57205
|
57206
| 57212 |
57213
|
57214