Bird
0
0

What is a major risk of leaving DEBUG = True enabled on a Django production server?

medium📝 Predict Output Q4 of 15
Django - Security Best Practices
What is a major risk of leaving DEBUG = True enabled on a Django production server?
ACSRF protection will be disabled
BThe site will automatically redirect to HTTPS
CDetailed error pages expose sensitive information
DUser passwords will be stored in plain text
Step-by-Step Solution
Solution:
  1. Step 1: Understand DEBUG Mode

    DEBUG=True shows detailed error pages with stack traces and environment info.
  2. Step 2: Identify Risks

    Exposing sensitive data like secret keys or database info can aid attackers.
  3. Final Answer:

    Detailed error pages expose sensitive information -> Option C
  4. Quick Check:

    Does DEBUG show detailed errors publicly? Yes [OK]
Quick Trick: Never leave DEBUG=True in production [OK]
Common Mistakes:
MISTAKES
  • Thinking DEBUG enables HTTPS redirects
  • Assuming CSRF protection is affected by DEBUG
  • Believing password storage changes with DEBUG

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes