From 944c29b96429ec95ac1371cb33cc43704a60c7b1 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 20 Nov 2018 16:02:03 +0100 Subject: Require POST for sending forms * Ensure that the form is submitted with a post request * Replaced several links with forms Closes #494 (Security Vulnerability) --- includes/view/AngelTypes_view.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'includes/view/AngelTypes_view.php') diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 58c9567b..ab4ce517 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -53,17 +53,12 @@ function AngelType_delete_view($angeltype) { return page_with_title(sprintf(__('Delete angeltype %s'), $angeltype['name']), [ info(sprintf(__('Do you want to delete angeltype %s?'), $angeltype['name']), true), - buttons([ - button(page_link_to('angeltypes'), glyph('remove') . __('cancel')), - button( - page_link_to( - 'angeltypes', - ['action' => 'delete', 'angeltype_id' => $angeltype['id'], 'confirmed' => 1] - ), - glyph('ok') . __('delete'), - 'btn-danger' - ) - ]) + form([ + buttons([ + button(page_link_to('angeltypes'), glyph('remove') . __('cancel')), + form_submit('delete', glyph('ok') . __('delete'), 'btn-danger', false), + ]) + ]), ]); } -- cgit v1.3.1