Project

General

Profile

Actions

Bug #69

closed

Missing Input Validation Across Multiple Fields (Add Partner API) (Web-API)

Added by Vivek Kumar 18 days ago. Updated 8 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
04/03/2026
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

The API lacks proper input validation and accepts invalid, malformed, and excessively long data across multiple fields.

Steps to Reproduce:

  1. Send a POST request to /api/partners/add
  2. Provide invalid or malformed values in all fields
  3. Observe that the API accepts the request without validation errors

ACTUAL RESULT
The fields don't have proper validation in API. Below are the validation issues:

  • first_name: No length validation
  • last_name: No length validation
  • email: No format validation and length validation
  • password: No length validation
  • secondary_password: No validation
  • website: No URL format validation
  • address: No length validation
  • address2: No length validation
  • role: No validation
  • role_type: No validation against valid database values (Accepts arbitrary valid but non existing Mongo db object id)
  • city: No validation
  • state: No validation against allowed values
  • zip: No format or length validation
  • phone: No format or length validation
  • assignedOutlets: No validation against valid database values

Expected Result
The API must validate all the fields and their format.

Actions #1

Updated by Adhi Narayanan 18 days ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #2

Updated by Vivek Kumar 8 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF