pathfilter

package
v2.3.8 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package pathfilter provides utilities for filtering and sanitizing file paths to prevent path traversal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterPath

func FilterPath(p string) string

FilterPath removes any ".." components from the path to prevent path traversal. It cleans the path first, then removes any ".." components. If the path becomes empty or only contains "." after filtering, it returns ".".

Types

This section is empty.

Jump to

Keyboard shortcuts

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