matchesUserinfo returns false if user and pass don't match userinfo. userinfo must not be nil.
(userinfo *url.Userinfo, user, pass string)
| 281 | // matchesUserinfo returns false if user and pass don't match userinfo. |
| 282 | // userinfo must not be nil. |
| 283 | func matchesUserinfo(userinfo *url.Userinfo, user, pass string) (ok bool) { |
| 284 | requiredPassword, _ := userinfo.Password() |
| 285 | |
| 286 | return user == userinfo.Username() && pass == requiredPassword |
| 287 | } |
| 288 | |
| 289 | // respondHTTPS writes a response to the DoH client. d must not be nil. |
| 290 | func (p *Proxy) respondHTTPS(d *DNSContext) (err error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…