Missing nil check for w http.ResponseWriter.
This is not critical for the user because the request has already failed by this time, but we should fix this. Maybe add a test for this method that feeds in nil values.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
I have a question on your issue description however. To me it looks like the writer isn't the dereferenced value, the line number suggests the p or error itself is nil or dereferenced?
Reading the issue body, I feel like you suggest that this should do?
*errors.errorStringruntime error: invalid memory address or nil pointer dereference/usr/local/go/src/runtime/panic.go in gopanic at line 423/var/cache/omnibus/src/gitlab-workhorse/_build/src/gitlab.com/gitlab-org/gitlab-workhorse/raven.go in 1 at line 29/usr/local/go/src/runtime/asm_amd64.s in call32 at line 437/usr/local/go/src/runtime/panic.go in gopanic at line 423/usr/local/go/src/runtime/panic.go in panicmem at line 42/usr/local/go/src/runtime/sigpanic_unix.go in sigpanic at line 24… /src/gitlab-workhorse/_build/src/gitlab.com/gitlab-org/gitlab-workhorse/internal/helper/raven.go in captureRavenError at line 26… rc/gitlab-workhorse/_build/src/gitlab.com/gitlab-org/gitlab-workhorse/internal/helper/helpers.go in Fail500 at line 20
@zj I find this hard to read but you have not convinced me the problem is not in helper.Fail500. Have you looked what the stack trace looks like if you put helper.Fail500 somewhere in an http handler that gets called by a test? Does the stack trace look similar?
So this specific error site doesn't exist any more. I've performed an audit of all Fail500 calls and don't see any that pass a nil for err or r any more.
So I don't think there's anything left to do here for master. We might want to consider backporting a fix to v1.3 if the relevant releases are still in support. Wdyt @jacobvosmaer-gitlab ?
@nick.thomas My customer is running the GitLab for Pivotal Cloud Foundry http://docs.pivotal.io/partners/gitlab/ - Which means an upgrade to 9.0 is not possible a backport may help but we would still need to re-release pivotal. @WarheadsSE Any suggestions here?
v1.2.0 of the PCF tile with GitLab 9.0.7 was released along with the rest of the security release versions. Thus, this should not longer be viable in up-to-date versions of the PCF tile.