Skip to content

Commit

Permalink
fix: issue #588
Browse files Browse the repository at this point in the history
  • Loading branch information
daylightstudio committed Nov 18, 2021
1 parent 3f47caa commit 2396417
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fuel/modules/fuel/controllers/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,10 @@ function delete($id = NULL)

if (!$this->_is_valid_csrf())
{
add_error(lang('data_not_deleted'));
//add_error(lang('data_not_deleted'));
$this->fuel->admin->set_notification(lang('data_not_deleted'), Fuel_admin::NOTIFICATION_ERROR);
$url = fuel_uri($this->module_uri);
redirect($url);
}

if (!empty($id))
Expand Down
2 changes: 2 additions & 0 deletions fuel/modules/fuel/libraries/Fuel_base_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ protected function _prep_csrf()

$this->form_builder->key_check_name = $this->_get_csrf_token_name();
$this->form_builder->key_check = $hash;

$this->load->vars(array('_csrf' => $this->form_builder->key_check, '_csrf_name' => $this->form_builder->key_check_name));
}

// --------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions fuel/modules/fuel/views/modules/module_delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<p class="instructions"><?=lang('delete_item_message')?><br/> <span class="delete"><?=$title?></span></p>
<?=$this->form->hidden('id', $id)?>
<?=$this->form->hidden($_csrf_name, $_csrf)?>

<div class="buttonbar clearfix">
<ul>
Expand Down

0 comments on commit 2396417

Please sign in to comment.