Merge pull request #256 from tseaver/patch-2

fix: mark 'hashlib.md5' as 'usedforsecurity=False'
This commit is contained in:
Yiorgis Gozadinos 2026-01-22 10:25:05 +02:00 committed by GitHub
commit 6201303df3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -514,7 +514,7 @@ class HaikuRAG:
raise ValueError(f"File does not exist: {source_path}")
uri = source_path.absolute().as_uri()
md5_hash = hashlib.md5(source_path.read_bytes()).hexdigest()
md5_hash = hashlib.md5(source_path.read_bytes(), usedforsecurity=False).hexdigest()
# Get content type from file extension (do before early return)
content_type, _ = mimetypes.guess_type(str(source_path))