Skip to content

Commit

Permalink
Potential fix for code scanning alert no. 57: Use of a broken or weak…
Browse files Browse the repository at this point in the history
… cryptographic hashing algorithm on sensitive data (#1588)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
DoroWolf and github-advanced-security[bot] authored Feb 26, 2025
1 parent 6a6e06e commit 02b75ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/database/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class CrowdinActivityRecords:
@retry(stop=stop_after_attempt(3))
@auto_rollback_error
def check(txt: str):
query_hash = hashlib.md5(
txt.encode(encoding="UTF-8"), usedforsecurity=False
query_hash = hashlib.sha256(
txt.encode(encoding="UTF-8")
).hexdigest()
query = (
session.query(CrowdinActivityRecordsTable)
Expand Down

0 comments on commit 02b75ea

Please sign in to comment.