(t *testing.T)
| 55 | } |
| 56 | |
| 57 | func 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 | |
| 65 | func TestCallbackHandlerEscapesError(t *testing.T) { |
| 66 | rec, _ := serveCallback(t, "state123", "error=evil&error_description=%3Cscript%3Ealert(1)%3C%2Fscript%3E") |
nothing calls this directly
no test coverage detected