stephen-bracken commented on code in PR #62180:
URL: https://github.com/apache/airflow/pull/62180#discussion_r2832451378


##########
airflow-core/src/airflow/models/connection.py:
##########
@@ -48,6 +48,8 @@
 RE_SANITIZE_CONN_ID = re.compile(r"^[\w#!()\-.:/\\]{1,}$")
 # the conn ID max len should be 250
 CONN_ID_MAX_LEN: int = 250
+# Pattern to mask URI password in log strings
+RE_SAFE_LOG_URI = re.compile(r"://(.*):(.*)@(.*?)(://.*?)?(:\d+?)?(\?.*?)?")

Review Comment:
   This should still work, although it will greedily match against the 
`@abc.com`. The goal here is to mask the password, so if someone used this URI 
they should realise that the first @ is being parsed as part of the password 
field



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

Reply via email to