mirror of
https://github.com/github/codeql.git
synced 2026-08-02 16:32:58 +02:00
13 lines
231 B
Go
13 lines
231 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func exampleHandlerBad(w http.ResponseWriter, r *http.Request) {
|
|
// BAD: the Origin and Host headers are user controlled
|
|
if r.Header.Get("Origin") != "http://"+r.Host {
|
|
//do something
|
|
}
|
|
}
|