Page MenuHomePhabricator

Censor URI credentials in CommandException summaries
ClosedPublic

Authored by epriestley on Mar 15 2014, 3:53 PM.
Tags
None
Referenced Files
F12195089: D8546.id20275.diff
Mon, Sep 25, 3:24 PM
F12193980: D8546.id20275.diff
Sun, Sep 24, 10:30 AM
F12193979: D8546.id20279.diff
Sun, Sep 24, 10:27 AM
F12192994: D8546.diff
Sat, Sep 23, 8:01 AM
F12185807: D8546.diff
Sat, Sep 16, 2:43 PM
F12172791: D8546.diff
Fri, Sep 8, 6:13 PM
F12160055: D8546.id20279.diff
Wed, Sep 6, 6:06 AM
F12146264: D8546.id.diff
Fri, Sep 1, 1:43 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
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).