Bugzilla – Attachment 154719 Details for
Bug 34601
Cannot manage suggestions without CSRF error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34601: Pass module into params
Bug-34601-Pass-module-into-params.patch (text/plain), 2.37 KB, created by
Lucas Gass (lukeg)
on 2023-08-23 17:48:53 UTC
(
hide
)
Description:
Bug 34601: Pass module into params
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-08-23 17:48:53 UTC
Size:
2.37 KB
patch
obsolete
>From f1681e34f4e784bc2d2bcc9a4ed3a77aca229297 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 23 Aug 2023 17:47:46 +0000 >Subject: [PATCH] Bug 34601: Pass module into params > >1. Make a suggestion >2. Try to edit, delete, or manage the suggestion. >3. Error: >4. Apply patch and restart_all >5. Try again and you should not get the error anymore. >--- > suggestion/suggestion.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 36a9f063af..8bfdc2b31d 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -135,7 +135,7 @@ my $branchfilter = $input->param('branchcode') || C4::Context->userenv->{'branch > ## > > if ( $op =~ /save/i ) { >- output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); >+ output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions' , check => 'csrf_token' }); > my @messages; > my $biblio = MarcRecordFromNewSuggestion({ > title => $suggestion_only->{title}, >@@ -254,7 +254,7 @@ elsif ($op=~/add/) { > } > elsif ($op=~/edit/) { > #Edit suggestion >- output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); >+ output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); > $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); > $suggestion_ref->{reasonsloop} = $reasonsloop; > my $other_reason = 1; >@@ -269,7 +269,7 @@ elsif ($op=~/edit/) { > $op ='save'; > } > elsif ($op eq "update_status" ) { >- output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); >+ output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); > my $suggestion; > # set accepted/rejected/managed informations if applicable > # ie= if the librarian has chosen some action on the suggestions >@@ -306,7 +306,7 @@ elsif ($op eq "update_status" ) { > } > redirect_with_params($input); > }elsif ($op eq "delete" ) { >- output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); >+ output_and_exit_if_error($input, $cookie, $template, { module => 'suggestions', check => 'csrf_token' }); > foreach my $delete_field (@editsuggestions) { > &DelSuggestion( $borrowernumber, $delete_field,'intranet' ); > } >-- >2.30.2
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 34601
:
154719
|
154720
|
154724
|
154747
|
154748
|
154762
|
154951
|
156122