Security Misconfigurations
# Vulnerable code (exposing sensitive information through error messages)
try:
# Code that may throw an exception
except Exception as e:
print("An error occurred: " + str(e))
# Secure code (proper error handling)
try:
# Code that may throw an exception
except Exception as e:
logError("An error occurred: " + str(e))
Last updated