korbit-ai[bot] commented on code in PR #31905:
URL: https://github.com/apache/superset/pull/31905#discussion_r1920275818


##########
superset/key_value/shared_entries.py:
##########
@@ -42,6 +42,7 @@ def set_shared_value(key: SharedKey, value: Any) -> None:
 def get_permalink_salt(key: SharedKey) -> str:
     salt = get_shared_value(key)
     if salt is None:
-        salt = random_key()
+        # Use a 48 bytes salt
+        salt = random_key(48)

Review Comment:
   ### Missing function parameter implementation <sub>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The code assumes that random_key() has been updated to accept a length 
parameter, but the function definition change is not included in this diff.
   
   ###### Why this matters
   This could lead to a runtime error if the random_key() function hasn't been 
modified to accept parameters, causing the application to crash when generating 
permalink salts.
   
   ###### Suggested change ∙ *Feature Preview*
   Ensure the random_key() function in 'superset/key_value/utils.py' is updated 
to accept a length parameter before merging this change:
   ```python
   def random_key(length: int = 8) -> str:
       # Implementation
   ```
   
   
   </details>
   
   ###### Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help 
Korbit improve your reviews.
   
   
   <!--- korbi internal id:6d880711-adf6-4ae9-98d4-0d8aff57a207 -->
   



-- 
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