Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCustomHeaders ¶
ApplyCustomHeaders parses the "headers" key from a plugin args map (formatted as "Name: value\nName: value\n") and sets each on req. No-op when args is nil or has no "headers" key.
func ComposeTarget ¶
ComposeTarget joins a base URL with an optional URI path, normalising the slash between them. When uri is empty, returns the base with any trailing slash trimmed. Matches CredMaster's `f"{url}/{pluginargs['uri']}"` for the common non-slashed cases, and avoids producing "//" when either side carries an extra slash.
Intended for plugins whose target path is operator-supplied via a `uri` pluginarg (httpbrute, httppost). Plugins with a fixed endpoint path (e.g. adfs, ews, owa, the OAuth2 family) keep their inline `strings.TrimRight(url, "/") + "/fixed/path"` composition.
Caller is responsible for sanitising operator-supplied URIs; this helper does not validate or canonicalise (no `..` collapsing, no scheme check, no path-traversal guard). Both args come from operator CLI input, so the threat model is operator-controlled, not attacker-controlled.
Types ¶
This section is empty.