pkg

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHeaders

func CompareHeaders(h1 http.Header, h2 http.Header, res *[]run.HeaderResult, noise map[string]string) bool

func Contains

func Contains(elems []string, v string) bool

func IsValidPath added in v0.5.6

func IsValidPath(s string) bool

func Match

func Match(exp, act string, noise []string, log *zap.Logger) (bool, error)

func RemoveNoise added in v0.5.6

func RemoveNoise(exp, act string, noise []string, log *zap.Logger) (interface{}, interface{})

RemoveNoise return the expected and actual body in JSON

func SanitiseInput added in v0.5.6

func SanitiseInput(s string) string

sanitiseInput sanitises user input strings before logging them for safety, removing newlines and escaping HTML tags. This is to prevent log injection, including forgery of log records. Reference: https://www.owasp.org/index.php/Log_Injection

Types

This section is empty.

Directories

Path Synopsis
platform
mgo
service
run

Jump to

Keyboard shortcuts

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