Documentation ¶
Overview ¶
Package sanitizer is a lightweight library that facilitates the safearchive libraries to prevent path traversal attempts by sanitize file paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizePath ¶
SanitizePath sanitizes the supplied path by purely lexical processing. The return value is safe to be joined together with a base directory (if the basedir is empty and no symlinks are present there). Join(base, SanitizePath(path)) will always produce a path contained within base and Clean(path) will always produce an unrooted path with no ".." path elements. If the input path had a directory separator at the end, the sanitized version will preserve that.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.