korbit-ai[bot] commented on code in PR #32423:
URL: https://github.com/apache/superset/pull/32423#discussion_r1975132026
##########
superset/db_engine_specs/clickhouse.py:
##########
@@ -334,9 +334,9 @@ def get_parameters_from_uri(
cls, uri: str, encrypted_extra: dict[str, Any] | None = None
) -> BasicParametersType:
url = make_url_safe(uri)
- query = url.query
+ query = dict(url.query)
if "secure" in query:
- encryption = url.query.get("secure") == "true"
+ encryption = query == "true"
Review Comment:
### Incorrect secure parameter evaluation <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The condition incorrectly compares the entire query dictionary with the
string "true" instead of checking the value of the 'secure' parameter.
###### Why this matters
This will always evaluate to False since a dictionary can never equal a
string, causing secure connections to fail even when 'secure=true' is specified
in the URI.
###### Suggested change ∙ *Feature Preview*
Correct the condition to properly check the value of the 'secure' parameter:
```python
encryption = query.get("secure") == "true"
```
</details>
<sub>
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/77fccde3-cc42-4ac5-9add-9d5fcd9bbf7b?suggestedFixEnabled=true)
💬 Chat with Korbit by mentioning @korbit-ai.
</sub>
<!--- korbi internal id:2fddbc38-b53b-42b6-9ce3-acd0c4630ba6 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]