Unit03 commented on a change in pull request #9615:
URL: https://github.com/apache/airflow/pull/9615#discussion_r448566919



##########
File path: airflow/providers/apache/spark/hooks/spark_submit.py
##########
@@ -237,8 +237,8 @@ def _mask_cmd(self, connection_cmd):
         # Mask any password related fields in application args with key value 
pair
         # where key contains password (case insensitive), e.g. 
HivePassword='abc'
         connection_cmd_masked = re.sub(
-            r"(\S*?(?:secret|password)\S*?\s*=\s*')[^']*(?=')",
-            r'\1******', ' '.join(connection_cmd), flags=re.I)
+            r"(\S*?(?:secret|password)\S*?\s*(?:=|\s+)(['\"]?))[^'^\"]+(\2)",

Review comment:
       Does this regular expression deserve some more explaining, possibly in 
the form of [inline 
comments](https://docs.python.org/3/library/re.html#re.VERBOSE)?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to