Skip to main content

Sanitize User Input for MongoDB Regex Queries in Search and ListAll Endpoints

Prevent application crashes caused by invalid regular expression patterns (e.g., *, +, (), etc.) in user-provided input used in MongoDB $regex queries.

Apply sanitization to all search and listAll endpoints across the application that use MongoDB $regex.

Ensure consistent handling of special characters in user input to avoid MongoServerError: quantifier does not follow a repeatable item.


Solution

Domain
General
Action
fix
Department
Backend
Status: Completed

Log in to comment and vote

No comments yet

Be the first to share your thoughts.