mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
15 lines
405 B
Go
15 lines
405 B
Go
// Phase 08 (Track J.6) — Go HEADER_INJECTION benign control fixture.
|
|
//
|
|
// Same shape as `vuln.go` but URL-encodes the value via
|
|
// `net/url.QueryEscape` before the header set, so CRLF bytes land as
|
|
// `%0D%0A` and the wire keeps a single header.
|
|
package benign
|
|
|
|
import (
|
|
"net/http"
|
|
"net/url"
|
|
)
|
|
|
|
func Run(w http.ResponseWriter, value string) {
|
|
w.Header().Set("Set-Cookie", url.QueryEscape(value))
|
|
}
|