Skip to content

Potential null pointer dereference #1956

Open
@error418

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions