hequn8128 commented on a change in pull request #12503:
URL: https://github.com/apache/flink/pull/12503#discussion_r435895550



##########
File path: flink-python/pyflink/pyflink_gateway_server.py
##########
@@ -41,8 +41,9 @@ def find_java_executable():
     flink_conf_path = os.path.join(flink_home, "conf", "flink-conf.yaml")
     java_home = None
 
-    if os.path.isfile(flink_conf_path):
-        with open(flink_conf_path, "r") as f:
+    real_flink_conf_path = os.path.realpath(flink_conf_path)

Review comment:
       Maybe add some comments here that we use realpath to avoid CWE22 
problems?

##########
File path: flink-python/pyflink/pyflink_gateway_server.py
##########
@@ -85,14 +86,15 @@ def construct_log_settings():
 
 def construct_classpath():
     flink_home = _find_flink_home()
+    real_flink_home = os.path.realpath(flink_home)

Review comment:
       ditto




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to