tektoncd/hub

Potential null pointer dereference

Opened this issue · 0 comments

The following code runs into a null pointer dereference and causes the application to panic returning a HTTP 502 for the /v1/resources endpoint.

No helpful logs were given.

parsedUrl, _ := url.Parse(resourceUrl)
host := "raw." + parsedUrl.Host
replacerStrings = append(replacerStrings, parsedUrl.Host, host)

Reproduce

This was caused in my case due to setting a ssh-clone url in the catalog definition property url instead of sshUrl, which causes url.Parse to return nil