Actions
Bug #81
closedBug #80: Insufficient Input Validation in /api/schools/add Allows Invalid and Malformed Data Submission (Web-api)
Improper Input Validation in /api/admin/add-role Allows Invalid Role Names (Web-Api)
Status:
Closed
Priority:
Normal
Assignee:
-
Description
The API does not properly validate input for the role creation endpoint. It accepts malformed, meaningless, and special character-only values for the name field, indicating missing or weak server-side validation.
Steps to Reproduce
- Send a POST request to /api/admin/add-role
- Provide invalid input in the request body:
{
"name": "..............."
}
- Observe that the API accepts the request and creates the role successfully
Actual Result
The API accepts invalid input for the name field:
name:
- Accepts special character-only values (e.g., "...............")
- Does not enforce meaningful or alphabetic input
- No restriction on format or content
Expected Result
The API must enforce strict validation on the name field:
- Reject special character-only or meaningless values
- Enforce proper format (e.g., alphabetic characters with spaces)
- Return reasonable errors for invalid inputs
Updated by Adhi Narayanan 10 days ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Actions