Fully parse secure and skip_verify DSN params #862
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current code will interpret a DSN with
?secure=false
in its options as a directive to turn TSL on!Obviously re-setting what is the default value is redundant, but deployment systems that template the DSN from e.g. environment variables may need to do this. (Also, the v1 clickhouse-go library supported this pattern, so this is technically a regression.)
The previous behavior (
?secure
without a value set turns secure on) is preserved to minimize surprise.Signed-off-by: Nathan J. Mehl n@oden.io