Homec4science

Censor URI credentials in CommandException summaries

Authored by epriestley <git@epriestley.com> on Mar 15 2014, 19:27.

Description

Censor URI credentials in CommandException summaries

Summary:
Fixes T4347. Make a simple effort to mask credentials (e.g., arising from stderr on git fetch) when formatting command failures for user consumption.

This isn't perfect, but I think it's a net positive overall.

Test Plan:
Added and executed unit tests. Also triggered a real exception:

EXCEPTION (CommandException): Command failed with error #1!
COMMAND
echo 'http://xxxxx@example.com' && false

STDOUT
http://xxxxx@example.com

STDERR
(empty)

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4347

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

Details

Committed
epriestley <git@epriestley.com>Mar 15 2014, 19:27
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU6b1066f7c0b3: Don't format "1/" as an ordered list in Remarkup
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU44faddd048df: Censor URI credentials in CommandException summaries (authored by epriestley <git@epriestley.com>).Mar 15 2014, 19:27