Skip to content

Commit c32de77

Browse files
Potential fix for code scanning alert no. 503: Use of a broken or weak cryptographic hashing algorithm on sensitive data
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 2342c4f commit c32de77

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/espota.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def authenticate(remote_addr, remote_port, password, use_md5_password, use_old_p
173173
# The password can be hashed with either MD5 or SHA256
174174
if use_md5_password:
175175
# Use MD5 for password hash (for devices that stored MD5 hashes)
176+
logging.warning("Using insecure MD5 hash for password due to legacy device support. Please upgrade devices if possible.")
176177
password_hash = hashlib.md5(password.encode()).hexdigest()
177178
else:
178179
# Use SHA256 for password hash (recommended)

0 commit comments

Comments
 (0)