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/controller/angeltypes_controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/controller/angeltypes_controller.php') diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index 82cbf935..821d101a 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -86,7 +86,7 @@ function angeltype_delete_controller() $angeltype = load_angeltype(); - if (request()->has('confirmed')) { + if (request()->hasPostData('delete')) { AngelType_delete($angeltype); success(sprintf(__('Angeltype %s deleted.'), AngelType_name_render($angeltype))); redirect(page_link_to('angeltypes')); @@ -127,7 +127,7 @@ function angeltype_edit_controller() $angeltype = AngelType_new(); } - if ($request->has('submit')) { + if ($request->hasPostData('submit')) { $valid = true; if (!$supporter_mode) { -- cgit v1.2.3-54-g00ecf