]> source.dussan.org Git - gitea.git/commit
fix broken insecureskipverify handling in rediss connection uris (#20967) (#21053)
authorzeripath <art27@cantab.net>
Sun, 4 Sep 2022 13:59:20 +0000 (14:59 +0100)
committerGitHub <noreply@github.com>
Sun, 4 Sep 2022 13:59:20 +0000 (14:59 +0100)
commit71aa64ae25fc50a258c7c60090bfe2e782640588
treef4267f4c4ba67a9705050502b65c464cecc91cb8
parent3aba72c6132e7254d99e93306bd90bd5b06f2202
fix broken insecureskipverify handling in rediss connection uris (#20967) (#21053)

Backport #20967

Currently, it's impossible to connect to self-signed TLS encrypted redis instances. The problem lies in inproper error handling, when building redis tls options - only invalid booleans are allowed to be used in `tlsConfig` builder. The problem is, when `strconv.ParseBool(...)` returns error, it always defaults to false - meaning it's impossible to set `tlsOptions.InsecureSkipVerify` to true.

Fixes #19213

Co-authored-by: Igor Rzegocki <ajgon@users.noreply.github.com>
modules/nosql/manager_redis.go
modules/nosql/manager_redis_test.go