You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2023/01/11 07:18:53 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #28846: Updated app to support configuring the caching hash method for FIPS

potiuk commented on code in PR #28846:
URL: https://github.com/apache/airflow/pull/28846#discussion_r1066645340


##########
airflow/models/serialized_dag.py:
##########
@@ -102,7 +102,7 @@ def __init__(self, dag: DAG, processor_subdir: str | None = None):
         dag_data = SerializedDAG.to_dict(dag)
         dag_data_json = json.dumps(dag_data, sort_keys=True).encode("utf-8")
 
-        self.dag_hash = hashlib.md5(dag_data_json).hexdigest()
+        self.dag_hash = hashlib.new("md5", data=dag_data_json, usedforsecurity=False).hexdigest()

Review Comment:
   Also we cannot use it unconditionally. usedforsecurity is available as of airflow 3.9 and we are supporting 3.7+.
   So if we want to add it, we need to add a compat library that will use it properly depending on Python version.



-- 
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: commits-unsubscribe@airflow.apache.org

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