method

package
v1.18.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeMethod

func NormalizeMethod(method string) (string, error)

NormalizeMethod validates and cleans a service invocation method name. It rejects methods containing '#', '?', '\', null bytes, control characters (bytes 0x01-0x1f and 0x7f), or a percent-encoded '/', '\' or '.' (%2F, %5C, %2E in any case), then resolves path traversal via path.Clean. The caller is responsible for percent-decoding (for HTTP) before calling. Encoded separators and dots are rejected because the ACL matches them as literal characters, while an HTTP app decodes them into path segments. A literal backslash is rejected because it is re-encoded to %5C on the wire to the app, which decodes it back into a character the ACL did not split on.

func ValidateName

func ValidateName(name string) error

ValidateName checks that a name (e.g. an actor type, actor ID, reminder or timer name) does not contain characters that could cause path traversal or injection when the name is embedded in a URL path. Unlike NormalizeMethod, this rejects any name containing '/' or '\' since names are identifiers, not paths, and, like NormalizeMethod, a percent-encoded '/', '\' or '.', which the app would decode into a path segment.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL