Bug 35106: CSRF fix

The removal of 'cud-' from op needs to happen sooner
because ill-requests.tt expects 'edit_action' op,
not 'cud-edit_action'.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-04-02 11:28:59 +00:00 committed by Katrin Fischer
parent c304eabc19
commit 631a80aaee
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 1 additions and 1 deletions

View File

@ -216,6 +216,7 @@ if ( $backends_available ) {
handle_commit_maybe($backend_result, $request);
} elsif ( $op eq 'cud-edit_action' ) {
$op =~ s/^cud-//;
# Handle edits to the Illrequest object.
# (not the Illrequestattributes)
# We simulate the API for backend requests for uniformity.
@ -225,7 +226,6 @@ if ( $backends_available ) {
order_by => { -asc => 'name' }
});
if ( !$params->{stage} ) {
$op =~ s/^cud-//;
my $backend_result = {
error => 0,
status => '',