Web Security & Input Handling Flashcards

(6 cards)

1
Q

Common API Vulnerabilities

A

Broken Authentication — tokens not validated
Excessive Data Exposure — API sends more data than needed

Examples:
API returns full user profile, not just username
Login token not verified on every request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Input Validation & Sanitisation

A

Validation: Check input format before processing (e.g., only numbers)
Sanitisation: Remove harmful parts (e.g., strip )

Prevents:
SQL Injection
Cross-Site Scripting (XSS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Secure Error Handling

A

Why: Prevent leaks of system info (e.g., stack traces, DB errors)
Principles:
Show generic errors to users (“Something went wrong”)
Log detailed errors privately for developers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Session Handling & Memory Security

A

Session Handling: Secure tokens, expiry, regeneration
Example: Auto-logout after inactivity
Memory Security: Avoid leaving passwords in memory; clear variables
Example: Zero out memory used by sensitive info

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Broken Authentication

A

When login mechanisms are flawed
Vulnerabilities:
Weak passwords
Session IDs in URLs
No MFA
Prevention:
Enforce strong password policies
Use secure session tokens
Add multi-factor authentication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are Token

A

In software development, a token is a small, indivisible unit of data that has meaning within a programming language or system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly