Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when accession newR.Context() #70

Closed
ScottBrooks opened this issue May 14, 2020 · 2 comments
Closed

Panic when accession newR.Context() #70

ScottBrooks opened this issue May 14, 2020 · 2 comments

Comments

@ScottBrooks
Copy link

When s.processRequest returns an error, newR is nil, and newR.Context() panics

secure/secure.go

Lines 252 to 255 in ab726b2

responseHeader, newR, err := s.processRequest(w, r)
addResponseHeaders(responseHeader, w)
return CSPNonce(newR.Context()), err

@unrolled
Copy link
Owner

Good catch! I'll fix that up right away, thanks!

@ScottBrooks
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants