You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "nija-at (via GitHub)" <gi...@apache.org> on 2023/04/20 08:26:06 UTC

[GitHub] [spark] nija-at commented on a diff in pull request #40853: [SPARK-43192] [CONNECT] Remove user agent validations

nija-at commented on code in PR #40853:
URL: https://github.com/apache/spark/pull/40853#discussion_r1172252726


##########
python/pyspark/sql/connect/client.py:
##########
@@ -269,18 +269,9 @@ def userAgent(self) -> str:
         user_agent : str
             The user_agent parameter specified in the connection string,
             or "_SPARK_CONNECT_PYTHON" when not specified.
+            The returned value will be percent encoded.
         """
-        user_agent = self.params.get(ChannelBuilder.PARAM_USER_AGENT, "_SPARK_CONNECT_PYTHON")
-        allowed_chars = string.ascii_letters + string.punctuation
-        if len(user_agent) > 200:

Review Comment:
   I've set a limit of 2048. Hopefully, that's large enough while having "some" protection.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org