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

Potential null pointer dereference #1956

Open
error418 opened this issue Aug 29, 2024 · 0 comments
Open

Potential null pointer dereference #1956

error418 opened this issue Aug 29, 2024 · 0 comments

Comments

@error418
Copy link

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

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

1 participant