Severity:
Medium
Context:
A form input allowed users to enter text with leading spaces. Later, additional text was concatenated to that input, but no trimming was applied.
Steps to Reproduce:
- Enter text with leading spaces in the form (e.g., ” text”).
- Submit the form.
- Append extra text via the system.
- Query the database for that text.
Expected Result:
- All entries are normalized.
- Leading and trailing spaces are removed before saving.
- No duplicates appear.
Actual Result:
- Entries with leading spaces are stored as separate records from those without.
- Duplicates appear in query results.
Example:
” text” vs “text” → stored separately → duplicates appeared
.
Impact:
- Confused users.
- Data integrity issues.
- Duplicate prevention logic fails.
Suggested Fix:
- Trim leading and trailing spaces from all text inputs before saving.
- Normalize stored data to avoid duplication.
- Validate and prevent empty or whitespace-only entries.
Lesson learnt:
Trim your spaces, or they’ll multiply like rabbits.
Let’s connect! I share common bugs, solutions, and QA tips regularly.