Page MenuHomePhabricator

Censor URI credentials in CommandException summaries
ClosedPublic

Authored by epriestley on Mar 15 2014, 3:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 10:22 AM
Unknown Object (File)
Tue, Nov 26, 10:22 AM
Unknown Object (File)
Tue, Nov 26, 10:22 AM
Unknown Object (File)
Tue, Nov 26, 10:03 AM
Unknown Object (File)
Mon, Nov 25, 9:26 PM
Unknown Object (File)
Sun, Nov 24, 9:01 PM
Unknown Object (File)
Thu, Nov 21, 6:31 PM
Unknown Object (File)
Thu, Nov 21, 1:52 PM
Subscribers

Details

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)

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Censor URI credentials in CommandException summaries.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Mar 15 2014, 4:20 PM
epriestley updated this revision to Diff 20279.

Closed by commit rPHU44faddd048df (authored by @epriestley).