From da78e7adc942fb4561f2eab8246c7d8a561a2289 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Sep 2023 10:23:41 +0200 Subject: [PATCH] Bug 34478: op-cud - Adjust C4::Auth code --- C4/Auth.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 755651e078a..7bd2b5d2f26 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1322,7 +1322,14 @@ sub checkauth { track_login_daily( $userid ); - if ( defined $query->param('op') ) { + my $original_op_cud = $query->param('op-cud'); + if ( $request_method eq 'GET' ) { + $query->param('op-cud', undef); + } elsif ( $request_method eq 'POST' ) { + $query->param('op', undef); + } + + if ( defined $original_op_cud ) { die "Cannot use GET for this request" if $request_method ne 'POST'; -- 2.25.1