Fix code scanning alert no. 33: Use of a broken or weak cryptographic hashing algorithm on sensitive data (#202)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
涵曦 2024-09-25 22:27:08 +08:00 committed by GitHub
parent 2b6619b4da
commit 092dd8a532
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,7 +114,7 @@ class XiaoMusic:
url_parts = urllib.parse.urlparse(url)
file_path = urllib.parse.unquote(url_parts.path)
correct_code = hashlib.md5(
correct_code = hashlib.sha256(
(
file_path
+ self.config.httpauth_username