From: epriestley Date: Fri, 4 Mar 2016 23:49:35 +0000 (-0800) Subject: Properly URL encode branches in `arc browse --branch ...` X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3876d9358390ee9a6290689ca38d8a1e972233b8;p=arcanist.git 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 --- 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.'/'; }