Page MenuHomePhabricator

Censor URI credentials in CommandException summaries
ClosedPublic

Authored by epriestley on Mar 15 2014, 3:53 PM.
Tags
None
Referenced Files
F14095457: D8546.diff
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
Unknown Object (File)
Sat, Nov 16, 5:23 PM
Unknown Object (File)
Wed, Nov 6, 8:51 PM
Unknown Object (File)
Mon, Oct 28, 2:01 AM
Unknown Object (File)
Oct 20 2024, 8:50 AM
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
Branch
censor3
Lint
Lint Passed
Unit
Tests Passed

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).