Flow PHP

RemoteUrlSanitizer

Read onlyYes
FinalYes

Reduces a remote URL to its scheme, host, optional port and path so that no secrets are ever reported as a resource attribute. Embedded credentials (user:password@) are removed, and any query string or fragment is dropped as either can carry an access token.

SCP-like SSH remotes (e.g. "git@github.com:org/repo.git") carry no secret and are returned untouched, as are URLs that cannot be parsed.

Methods

sanitize()  : string

Methods

sanitize()

public sanitize(string $url) : string
Parameters
$url : string
Return values
string
On this page

Search results