From 3876d9358390ee9a6290689ca38d8a1e972233b8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 4 Mar 2016 15:49:35 -0800 Subject: [PATCH] Properly URL encode branches in `arc browse --branch ...` Summary: Fixes T10511. If you `arc browse --branch x/y/z`, we do not encode the URI properly. Test Plan: Ran `arc browse --branch x/y/z/ something.c`. Before, got an error about "x" does not exist. This is wrong; the error should be about "x/y/z". After, got the proper error: {F1141096} Reviewers: chad, avivey Reviewed By: avivey Maniphest Tasks: T10511 Differential Revision: https://secure.phabricator.com/D15397 --- src/workflow/ArcanistBrowseWorkflow.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/workflow/ArcanistBrowseWorkflow.php b/src/workflow/ArcanistBrowseWorkflow.php index 76aa66dd..64d8f84a 100644 --- a/src/workflow/ArcanistBrowseWorkflow.php +++ b/src/workflow/ArcanistBrowseWorkflow.php @@ -225,6 +225,7 @@ EOTEXT } $branch = $this->getArgument('branch', 'master'); + $branch = phutil_escape_uri_path_component($branch); return $repo_uri.'browse/'.$branch.'/'; } -- 2.43.0