@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

T6555, When creating a task with a non existing parent parameter, phabricator should 404

Summary: Fixes T6555, The following should 404: /maniphest/task/create/?parent=asdf, /maniphest/task/create/?parent=0, /maniphest/task/create/?parent=999999 (where T999999 does not exist)

Test Plan: Navigate to /maniphest/task/create/?parent=asdf or /maniphest/task/create/?parent=0 or /maniphest/task/create/?parent=999999 (where T999999 does not exist). See 404.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6555

Differential Revision: https://secure.phabricator.com/D11258

authored by

lkassianik and committed by
epriestley
9c568802 648fa2e1

+4 -1
+4 -1
src/applications/maniphest/controller/ManiphestTaskEditController.php
··· 126 126 127 127 // You can only have a parent task if you're creating a new task. 128 128 $parent_id = $request->getInt('parent'); 129 - if ($parent_id) { 129 + if (strlen($parent_id)) { 130 130 $parent_task = id(new ManiphestTaskQuery()) 131 131 ->setViewer($user) 132 132 ->withIDs(array($parent_id)) 133 133 ->executeOne(); 134 + if (!$parent_task) { 135 + return new Aphront404Response(); 136 + } 134 137 if (!$template_id) { 135 138 $template_id = $parent_id; 136 139 }