pkg

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 12 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHttpBodyToMap added in v0.7.4

func AddHttpBodyToMap(body string, m map[string][]string) error

func CompareHeaders

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

func Contains

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

func FindNoisyFields added in v0.7.4

func FindNoisyFields(m map[string][]string, comparator func(string, []string) bool) []string

func Flatten added in v0.7.4

func Flatten(j interface{}) map[string][]string

Flatten takes a map and returns a new one where nested maps are replaced by dot-delimited keys. examples of valid jsons - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#examples

func FlattenHttpResponse added in v0.7.4

func FlattenHttpResponse(h http.Header, body string) (map[string][]string, error)

func IsTime added in v0.7.4

func IsTime(stringDate 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) (string, string, bool, error)

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
fs
mgo
service
run

Jump to

Keyboard shortcuts

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