Bugzilla – Attachment 72592 Details for
Bug 20367
userid resets to firstname.surname when BorrowerUnwantedField contains userid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid
Bug-20367-Avoid-resetting-userid-when-BorrowerUnwa.patch (text/plain), 1.67 KB, created by
Lari Taskula
on 2018-03-09 13:51:46 UTC
(
hide
)
Description:
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2018-03-09 13:51:46 UTC
Size:
1.67 KB
patch
obsolete
>From e695aa1aa3fde5aa469786a43a57c5d2dc33c7b7 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Fri, 9 Mar 2018 15:49:27 +0200 >Subject: [PATCH] Bug 20367: Avoid resetting userid when BorrowerUnwantedField > contains userid > >To test: >1. In staff client, set your username to firstname >2. Add userid to BorrowerUnwantedField system preference >3. Go to your patron modification screen (memberentry.pl) and click Save >4. Observe you get kicked out into login screen, saying: >Error: You do not have permission to access this page. >Log in as a different user > >5. Apply patch and restart plack > >6. Set your username back to firstname >7. Repeat step 3 >8. Observe you were not kicked out and your userid stays the same >--- > members/memberentry.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 35c6ff0..94e371f 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -277,7 +277,7 @@ $newdata{'lang'} = $input->param('lang') if defined($input->param('lang')) > > # builds default userid > # userid input text may be empty or missing because of syspref BorrowerUnwantedField >-if ( ( defined $newdata{'userid'} && $newdata{'userid'} eq '' ) || $check_BorrowerUnwantedField =~ /userid/ ) { >+if ( ( defined $newdata{'userid'} && $newdata{'userid'} eq '' ) || $check_BorrowerUnwantedField =~ /userid/ && !defined $data{'userid'} ) { > if ( ( defined $newdata{'firstname'} ) && ( defined $newdata{'surname'} ) ) { > # Full page edit, firstname and surname input zones are present > $newdata{'userid'} = Generate_Userid( $borrowernumber, $newdata{'firstname'}, $newdata{'surname'} ); >-- >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 20367
:
72592
|
72786
|
72803