Closed monde closed 10 months ago
This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale
label.
This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale
label.
Describe the bug?
Config nil pointer panic when cfg.Okta.Client.OrgUrl is is malformed.
What is expected to happen?
Graceful validation and failure.
What is the actual behavior?
nil pointer panic
Reproduction Steps?
have malformed org url
Additional Information?
No response
Golang Version
go version go1.21.0 darwin/amd64
SDK Version
Issue template seems to have misinformation.
OS version
@duytiennguyen-okta there needs to be some validation or graceful failure in the v3 okta-sdk-golang client if org url is malformed. Here url.Parse is called, but without inspecting the error object:
purl, _ := url.Parse(cfg.Okta.Client.OrgUrl)
https://github.com/okta/okta-sdk-golang/blob/master/.generator/templates/configuration.mustache#L260 The next linecfg.Host = purl.Hostname()
will nil panic if there was a parse error.Given an org url of "iadf^dfads.okta.com"
Was seeing this in TF: https://github.com/okta/terraform-provider-okta/issues/1712