Files
codeql/go/ql/test/query-tests/Security/CWE-312/CleartextLogging.go
2022-05-20 10:07:19 -07:00

18 lines
323 B
Go

package main
import (
"log"
"net/http"
)
func serve() {
http.HandleFunc("/register", func(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
user := r.Form.Get("user")
pw := r.Form.Get("password")
log.Printf("Registering new user %s with password %s.\n", user, pw)
})
http.ListenAndServe(":80", nil)
}