Page MenuHomePhabricator

Censor URI credentials in CommandException summaries
ClosedPublic

Authored by epriestley on Mar 15 2014, 3:53 PM.
Tags
None
Referenced Files
F15526152: D8546.id20275.diff
Mon, Apr 21, 7:38 PM
F15518508: D8546.id20279.diff
Sat, Apr 19, 2:04 PM
F15517601: D8546.id.diff
Sat, Apr 19, 7:06 AM
F15516614: D8546.diff
Fri, Apr 18, 8:01 PM
F15491561: D8546.diff
Sat, Apr 12, 4:54 AM
F15490143: D8546.id20275.diff
Fri, Apr 11, 2:43 PM
F15416928: D8546.id20275.diff
Mar 20 2025, 2:23 PM
F15397001: D8546.id20279.diff
Mar 16 2025, 5:33 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
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).