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>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</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>
   
   [![Report a problem with this 
comment](https://img.shields.io/badge/Report%20a%20problem%20with%20this%20comment-gray.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmNWVjMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10cmlhbmdsZS1hbGVydCI+PHBhdGggZD0ibTIxLjczIDE4LTgtMTRhMiAyIDAgMCAwLTMuNDggMGwtOCAxNEEyIDIgMCAwIDAgNCAyMWgxNmEyIDIgMCAwIDAgMS43My0zIi8+PHBhdGggZD0iTTEyIDl2NCIvPjxwYXRoIGQ9Ik0xMiAxN2guMDEiLz48L3N2Zz4=)](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]

Reply via email to