Computer Security Applicationsintermediate
A database-backed application needs to stop showing detailed database errors to ordinary users while retaining information for investigation. Which approach best matches the lesson?
Answer
Use appropriate error handling and log database errors
Explanation
### Why this is right
Appropriate error handling avoids exposing unnecessary database details to users, while logs preserve information that staff can review. The lesson recommends catching and logging SQL errors or unexpected behavior.
### The concept
User-facing messages and internal records serve different purposes. A user usually needs a safe, understandable response, while authorized staff may need diagnostic details in logs. Monitoring those records can help reveal suspicious activity.
### The other options
- **A. Show detailed errors to everyone**: this can disclose system details and does not improve error handling.
- **C. Disable all logging**: this removes a source of information for investigation and monitoring.
- **D. Give users database administrator access**: broad database permissions increase risk and do not solve error disclosure.
### Terms
- **SQL**: Structured Query Language, used to interact with relational databases.
- **Error handling**: deciding how software responds when an operation fails.
- **Logging**: recording events for later review.
### Remember
Keep user responses appropriate and preserve diagnostic information in controlled logs.
Related Questions
- Regular security audits and penetration tests can help identify and fix application weaknesses before attackers exploit them.(basic)
- In blind Structured Query Language (SQL) injection, the attacker cannot directly see the result and instead infers information from application behavior.(basic)
- A Web Application Firewall (WAF) should be treated as a replacement for secure query construction.(basic)
- A database account should have only the permissions required for its task. This is the principle of _____.(basic)
- What is the main reason to avoid constructing database statements dynamically from unchecked user input?(basic)
Want to practice more questions like this?
Join myBenkio free and practice past questions for your Nigerian university courses with AI explanations for every answer.
Start Practicing Free