MCPcopy Index your code
hub / github.com/github/github-mcp-server / TestCallbackHandlerOAuthError

Function TestCallbackHandlerOAuthError

internal/oauth/callback_test.go:57–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func TestCallbackHandlerOAuthError(t *testing.T) {
58 _, res := serveCallback(t, "state123", "error=access_denied&error_description=user+said+no")
59
60 require.Error(t, res.err)
61 assert.Contains(t, res.err.Error(), "access_denied")
62 assert.Contains(t, res.err.Error(), "user said no")
63}
64
65func TestCallbackHandlerEscapesError(t *testing.T) {
66 rec, _ := serveCallback(t, "state123", "error=evil&error_description=%3Cscript%3Ealert(1)%3C%2Fscript%3E")

Callers

nothing calls this directly

Calls 2

serveCallbackFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected