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

Improve usage of OIDC_TLS_VERIFY #78

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix inverted logic of OIDC_TLS_VERIFY
When OIDC_TLS_VERIFY was set to the string "true" this was converted
to the boolean `true` by `strToBool`. This resulted in `skipTLSVerify`
also returning `true`. Thus verification was actually skipped.

Fixed this inverted logic bug.
ServiusHack committed Nov 13, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2095d6961db2d12533ef4db2d9ee1017b77e46a1
2 changes: 1 addition & 1 deletion pkg/client.go
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ func strToBool(str string) bool {

func skipTLSVerify() bool {
tlsVerify := strings.ToLower(Env("OIDC_TLS_VERIFY", "true"))
return strToBool(tlsVerify)
return !strToBool(tlsVerify)
}

func createContext(from context.Context) context.Context {