Skip to content

Commit

Permalink
Fix error 2800 when deleting custom field
Browse files Browse the repository at this point in the history
This error is a regression introduced by fix for issue #27274.

Changing security token name in manage_custom_field_delete.php from
manage_custom_field_delete to manage_custom_field_update resolves the
problem.

It makes more sense to reuse the existing token rather than generate a
new, specific one in manage_custom_field_edit_page.php since we're using
the same form data for update and delete operations.

Fixes #33248
  • Loading branch information
dregad committed Dec 3, 2023
1 parent afe6c72 commit fe404e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manage_custom_field_delete.php
Expand Up @@ -49,7 +49,7 @@
require_api( 'print_api.php' );
require_api( 'string_api.php' );

form_security_validate( 'manage_custom_field_delete' );
form_security_validate( 'manage_custom_field_update' );

auth_reauthenticate();
access_ensure_global_level( config_get( 'manage_custom_fields_threshold' ) );
Expand All @@ -71,6 +71,6 @@

custom_field_destroy( $f_field_id );

form_security_purge( 'manage_custom_field_delete' );
form_security_purge( 'manage_custom_field_update' );

print_header_redirect( $f_return );

0 comments on commit fe404e1

Please sign in to comment.