Secure Error Handling & Logging Flashcards
6 cards from real CASE practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Secure Error Handling & Logging flashcards as text
What should a production application show users when an unhandled exception occurs?
Answer: A generic error message, with details logged on the server only
Detailed errors leak information an attacker can use, such as stack traces, queries and versions. Users should get a generic message, while the details go to secure server-side logs.
What does the 'fail securely' (fail closed) principle mean?
Answer: When an error occurs, the system defaults to denying access
Failing securely means that if an exception happens, for example during an authorization check, the system ends up in a secure state and denies access rather than allowing it.
Which of these should NEVER be written to application logs?
Answer: Plaintext passwords and full session tokens
Logs are often widely accessible and kept for a long time. Passwords, session tokens, card numbers and similar secrets must never be logged, or should be masked.
An attacker submits input containing CR/LF characters so that fake entries appear in the log file. What is this attack called?
Answer: Log injection (log forging)
Log injection uses newline characters to forge log entries, which can mislead investigators. The defense is to sanitize or encode user data before it is logged.
Which coding practice weakens security in exception handling?
Answer: Using empty catch blocks that swallow exceptions
Empty catch blocks hide failures, can leave the application in an inconsistent or insecure state, and remove evidence of attacks.
Which events are most important for a security audit log to capture?
Answer: Authentication successes and failures, authorization failures and changes to sensitive data
Security logging should record authentication events, access-control failures, input validation failures and changes to sensitive data. Together these support detection, incident response and accountability.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- cert.eccouncil.org — Score validity, eligibility, fees · verified Oct 2026
- eccouncil.org — Test delivery, exam format, passing score, time limit · verified Oct 2026