Page MenuHomePhorge
Diviner libphutil Tech Docs phutil_censor_credentials

function phutil_censor_credentials($string)
libphutil Technical Documentation (Core Utilities)

Attempt to censor any plaintext credentials from a string.

The major use case here is to censor usernames and passwords from command output. For example, when git fetch fails, the output includes credentials for authenticated HTTP remotes.

Parameters
string$stringSome block of text.
Return
stringA similar block of text, but with credentials that could be identified censored.