planpath

package
v0.1.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package planpath 解析客户端 plan 路径与服务端 plan 文件名安全校验。

Index

Constants

View Source
const DefaultPlanDir = "plans"

Variables

This section is empty.

Functions

func JoinPlanDir

func JoinPlanDir(planDir, baseName string) (string, error)

JoinPlanDir 将服务端 plan 目录与安全基名拼接为绝对路径。

func ResolveClientPlanPath

func ResolveClientPlanPath(planDir, arg string) (string, error)

ResolveClientPlanPath 将 CLI 的 --pcap-plan 解析为绝对路径。 纯文件名(无分隔符、非绝对、不以 . 开头)则与 planDir 拼接。

func ValidatePlanBaseName

func ValidatePlanBaseName(name string) error

ValidatePlanBaseName 校验 START 中的 pcap_plan_name,防路径穿越。

Types

This section is empty.

Source Files

  • planpath.go

Jump to

Keyboard shortcuts

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