MCPcopy Create free account
hub / github.com/cli/cli / NewImmutableSafeURL

Function NewImmutableSafeURL

internal/safeurl/safeurl.go:120–122  ·  view source on GitHub ↗

NewImmutableSafeURL returns an ImmutableSafeURL that renders url verbatim. Only pass a URL you built yourself from trusted components or received from a trusted source, such as a server response; this bypasses all percent-encoding, so passing a value that embeds unescaped user or third party input r

(url string)

Source from the content-addressed store, hash-verified

118// that embeds unescaped user or third party input reintroduces the injection risk that
119// SafeURL exists to prevent.
120func NewImmutableSafeURL(url string) *ImmutableSafeURL {
121 return &ImmutableSafeURL{url: url}
122}
123
124func (u *ImmutableSafeURL) sealed() {}
125

Callers 15

GetCachesFunction · 0.92
deleteAssetRunFunction · 0.92
deleteRunFunction · 0.92
uploadAssetFunction · 0.92
uploadRunFunction · 0.92
createRunFunction · 0.92

Calls

no outgoing calls