Fix exception in Maniphest task ID filtering
Summary: Ref T2632. When the user enters task IDs, we filter them to allow the user to write `T123` or `task 123` to mean `123`. This filtering is latin-centric and silly, and cuases an exception when accessing, e.g,, `/maniphest/view/custom/?tasks=~`. Instead of stripping a select few nondigits, strip all nondigits. Test Plan: Hit `/maniphest/view/custom/?tasks=~`, no exception. Reviewers: AnhNhan, chad, vrana Reviewed By: chad CC: aran Maniphest Tasks: T2632 Differential Revision: https://secure.phabricator.com/D5193
This commit is contained in:
@@ -731,7 +731,7 @@ final class ManiphestTaskListController extends ManiphestController {
|
||||
$numeric_task_ids = array();
|
||||
|
||||
foreach ($task_ids as $task_id) {
|
||||
$task_id = preg_replace('/[a-zA-Z]+/', '', $task_id);
|
||||
$task_id = preg_replace('/[^\d]+/', '', $task_id);
|
||||
if (!empty($task_id)) {
|
||||
$numeric_task_ids[] = $task_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user