Skip to content

Instantly share code, notes, and snippets.

@ejholmes
Created September 28, 2017 00:12
Show Gist options
  • Save ejholmes/d7341988bfe67e5d6f14122c4494c707 to your computer and use it in GitHub Desktop.
Save ejholmes/d7341988bfe67e5d6f14122c4494c707 to your computer and use it in GitHub Desktop.
Credentials in Go error messages
package main
import (
"log"
"net/http"
)
func main() {
_, err := http.Get("http://notso:secret@wdjkwakdjwalkdjk.awdwad.fooo")
if err != nil {
log.Fatal(err)
}
}
@ejholmes
Copy link
Author

$ go run test.go 
2017/09/27 17:10:51 Get http://notso:secret@wdjkwakdjwalkdjk.awdwad.fooo: dial tcp: lookup wdjkwakdjwalkdjk.awdwad.fooo: no such host
exit status 1

Now I have your secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment