File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ jobs:
329329 strategy :
330330 fail-fast : false
331331 matrix :
332- cloud-provider : [aws]
332+ cloud-provider : [aws, azure, gcp ]
333333 steps :
334334 - uses : actions/checkout@v4
335335 - name : Setup parameters file
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
99# Release Notes
1010- v3.18.1(July 15,2026)
1111 - Improved verification of TLS connections (SNOW-3675579).
12+ - Fixed FIPS environments md5 hash issues with multipart upload on Azure.
1213
1314- v3.18.0(October 03,2025)
1415 - Added support for pandas conversion for Day-time and Year-Month Interval types
Original file line number Diff line number Diff line change 1414from .constants import FileHeader , ResultStatus
1515from .encryption_util import EncryptionMetadata
1616from .storage_client import SnowflakeStorageClient
17- from .util_text import get_md5
17+ from .util_text import get_md5_for_integrity
1818from .vendored import requests
1919
2020if TYPE_CHECKING : # pragma: no cover
@@ -241,9 +241,9 @@ def _complete_multipart_upload(self) -> None:
241241 fd .close ()
242242 headers = {
243243 "x-ms-blob-content-encoding" : "utf-8" ,
244- "x-ms-blob-content-md5" : base64 .b64encode (get_md5 ( file_content )). decode (
245- "utf-8"
246- ),
244+ "x-ms-blob-content-md5" : base64 .b64encode (
245+ get_md5_for_integrity ( file_content )
246+ ). decode ( "utf-8" ) ,
247247 }
248248 azure_metadata = self ._prepare_file_metadata ()
249249 headers .update (azure_metadata )
Original file line number Diff line number Diff line change @@ -293,9 +293,11 @@ def _base64_bytes_to_str(x) -> str | None:
293293 return base64 .b64encode (x ).decode ("utf-8" ) if x else None
294294
295295
296- def get_md5 (text : str | bytes ) -> bytes :
296+ def get_md5_for_integrity (text : str | bytes ) -> bytes :
297+ # MD5 should not be used for security reasons - only integrity is safe and allowed
297298 if isinstance (text , str ):
298299 text = text .encode ("utf-8" )
299- md5 = hashlib .md5 ()
300+ # Usedforsecurity=False added to support FIPS envs as well
301+ md5 = hashlib .md5 (usedforsecurity = False )
300302 md5 .update (text )
301303 return md5 .digest ()
You can’t perform that action at this time.
0 commit comments