Bugzilla – Attachment 124452 Details for
Bug 28947
OPAC user can create new users
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28947: Prevent OPAC user to create new users
Bug-28947-Prevent-OPAC-user-to-create-new-users.patch (text/plain), 4.10 KB, created by
Nick Clemens (kidclamp)
on 2021-09-03 10:41:03 UTC
(
hide
)
Description:
Bug 28947: Prevent OPAC user to create new users
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-09-03 10:41:03 UTC
Size:
4.10 KB
patch
obsolete
>From d4d65f5f7f9083adc3d563b2bc72f09b6d2b8f78 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 3 Sep 2021 12:01:12 +0200 >Subject: [PATCH] Bug 28947: Prevent OPAC user to create new users > >This patch prevents an existing user from exploiting the patron edit form in order to >force create new patrons > >To test: >1 - Test with PatronSelfRegistration:Don't Allow PatronSelfRegistrationVerifyByEmail:Don't Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - Fill out form - patron is created FAIL > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - you are sent to opac-main >2 - Test with PatronSelfRegistration:Don't Allow PatronSelfRegistrationVerifyByEmail:Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - Fill out form - patron is sent email/will be created FAIL > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - you are sent to opac-main >3 - Test with PatronSelfRegistration:Allow PatronSelfRegistrationVerifyByEmail:Don't Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - Fill out form - patron is created FAIL > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - patron is created OK >4 - Test with PatronSelfRegistration:Allow PatronSelfRegistrationVerifyByEmail:Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - Fill out form - patron is sent email/will be created FAIL > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - patron is sent email/will be created OK >5 - APPLY PATCH >6 - Test with PatronSelfRegistration:Don't Allow PatronSelfRegistrationVerifyByEmail:Don't Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - You are sent to opac-main > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - You are sent to opac-main >7 - Test with PatronSelfRegistration:Don't Allow PatronSelfRegistrationVerifyByEmail:Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - You are sent to opac-main > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - You are sent to opac-main >8 - Test with PatronSelfRegistration:Allow PatronSelfRegistrationVerifyByEmail:Don't Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - You are sent to opac-main > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - patron is created OK >9 - Test with PatronSelfRegistration:Allow PatronSelfRegistrationVerifyByEmail:Require > - sign in to opac > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - You are sent to opac-main > - sign out > - go to http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-memberentry.pl?action=create > - patron is sent email/will be created OK > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > opac/opac-memberentry.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index c940a6e1af..475ee6e943 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -64,6 +64,11 @@ unless ( C4::Context->preference('PatronSelfRegistration') || $borrowernumber ) > } > > my $action = $cgi->param('action') || q{}; >+if ( $borrowernumber && ( $action eq 'create' || $action eq 'new' ) ) { >+ print $cgi->redirect("/cgi-bin/koha/opac-main.pl"); >+ exit; >+} >+ > if ( $action eq q{} ) { > if ($borrowernumber) { > $action = 'edit'; >-- >2.20.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 28947
:
124451
|
124452
|
124533