Page MenuHomePhabricator

Censor URI credentials in CommandException summaries
ClosedPublic

Authored by epriestley on Mar 15 2014, 3:53 PM.
Tags
None
Referenced Files
F13083354: D8546.diff
Wed, Apr 24, 10:30 PM
Unknown Object (File)
Thu, Apr 11, 9:20 AM
Unknown Object (File)
Sat, Apr 6, 4:08 PM
Unknown Object (File)
Tue, Apr 2, 1:26 AM
Unknown Object (File)
Tue, Apr 2, 12:22 AM
Unknown Object (File)
Mar 5 2024, 5:45 PM
Unknown Object (File)
Feb 29 2024, 2:40 AM
Unknown Object (File)
Jan 25 2024, 6:53 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).