Remove Sec-Ch-Ua and Sec-Ch-Ua-Platform from challenge key
This commit is contained in:
@@ -48,6 +48,7 @@ func getRequestAddress(r *http.Request, clientHeader string) net.IP {
|
|||||||
// drop port
|
// drop port
|
||||||
ipStr = strings.Join(parts[:len(parts)-1], ":")
|
ipStr = strings.Join(parts[:len(parts)-1], ":")
|
||||||
}
|
}
|
||||||
|
ipStr = strings.Trim(ipStr, "[]")
|
||||||
return net.ParseIP(ipStr)
|
return net.ParseIP(ipStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +65,9 @@ func (state *State) GetChallengeKeyForRequest(challengeName string, until time.T
|
|||||||
"Accept-Language",
|
"Accept-Language",
|
||||||
// General browser information
|
// General browser information
|
||||||
"User-Agent",
|
"User-Agent",
|
||||||
"Sec-Ch-Ua",
|
// TODO: not sent in preload
|
||||||
"Sec-Ch-Ua-Platform",
|
//"Sec-Ch-Ua",
|
||||||
|
//"Sec-Ch-Ua-Platform",
|
||||||
} {
|
} {
|
||||||
hasher.Write([]byte(r.Header.Get(k)))
|
hasher.Write([]byte(r.Header.Get(k)))
|
||||||
hasher.Write([]byte{0})
|
hasher.Write([]byte{0})
|
||||||
|
|||||||
Reference in New Issue
Block a user