Bugzilla – Attachment 60282 Details for
Bug 18025
Expired password recovery links cause sql crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18025: Simplify logic and avoid 1 call to ValidateBorrowernumber
Bug-18025-Simplify-logic-and-avoid-1-call-to-Valid.patch (text/plain), 1.55 KB, created by
Jonathan Druart
on 2017-02-15 17:14:40 UTC
(
hide
)
Description:
Bug 18025: Simplify logic and avoid 1 call to ValidateBorrowernumber
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-15 17:14:40 UTC
Size:
1.55 KB
patch
obsolete
>From 37c915c2f5bcaadd922653b82a78321a6732f072 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Feb 2017 17:14:11 +0000 >Subject: [PATCH] Bug 18025: Simplify logic and avoid 1 call to > ValidateBorrowernumber > >--- > opac/opac-password-recovery.pl | 18 ++++++++---------- > 1 file changed, 8 insertions(+), 10 deletions(-) > >diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl >index 2099caf..8c76015 100755 >--- a/opac/opac-password-recovery.pl >+++ b/opac/opac-password-recovery.pl >@@ -90,16 +90,14 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { > } > > # Check if a password reset already issued for this borrower AND we are not asking for a new email >- elsif ( ValidateBorrowernumber( $borrower->borrowernumber ) >- && !$query->param('resendEmail') ) >- { >- $hasError = 1; >- $errAlreadyStartRecovery = 1; >- } >- elsif ( !ValidateBorrowernumber($borrower->borrowernumber) >- && !$query->param('resendEmail') ) >- { >- DeleteExpiredPasswordRecovery($borrower->borrowernumber); >+ elsif ( not $query->param('resendEmail') ) { >+ if ( ValidateBorrowernumber( $borrower->borrowernumber ) ) { >+ $hasError = 1; >+ $errAlreadyStartRecovery = 1; >+ } >+ else { >+ DeleteExpiredPasswordRecovery( $borrower->borrowernumber ); >+ } > } > } > else { # 0 matching borrower >-- >2.1.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 18025
:
59760
|
60108
|
60223
|
60245
|
60281
|
60282
|
60295
|
60296
|
60303
|
60304
|
60305
|
60311
|
60312
|
60313