@marcel91200 / caddy Mirror · read-only / commits / 3634c459
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

ci: fuzz: skip fuzz data that contains `import` (#3214)

Thus far the fuzzers have found a few crashers in the Caddyfile parser. However, the fuzzer have been stuck at import glob expansion after import glob expansion, which aren't reproducible.

Mohammed Al Sahaf committed Apr 2, 2020 at 19:40 UTC 3634c4593f2d9999dca2d7a02e23edc29bf7bd11
1 file changed +5
caddyconfig/caddyfile/parse_fuzz.go
+5
@@ -16,7 +16,12 @@
16
17 package caddyfile
18
19 +import "bytes"
20 +
21 func FuzzParseCaddyfile(data []byte) (score int) {
22 + if bytes.Contains(data, []byte("import")) {
23 + return -1
24 + }
25 sb, err := Parse("Caddyfile", data)
26 if err != nil {
27 // if both an error is received and some ServerBlocks,