The POST /project/search `name` filter restricted input to alphanumeric
characters and hyphens via a character validator. Project names legitimately
contain spaces (and other characters), so searching for a multi-word name
like "My Project" was rejected with a validation error before it ever
reached the query.
The validator was redundant for safety: the DAL matches the term with a
parameterized ILIKE whose wildcards are escaped via sanitizeSqlLikeString,
so user input cannot break out of the LIKE pattern. Relax the schema to a
trimmed string bounded at 255 chars, matching the identity search filter.
Context
Fixes #5813.
In Organization → Projects → All Projects, searching with a normal multi-word name fails. The
POST /api/v1/project/searchendpoint validated thenamefilter with a character validator that only permitted alphanumeric characters and hyphens:Project names legitimately contain spaces (and other characters), so a search like
My Projectis rejected with a validation error before it reaches the query.The charset restriction was redundant as a safety measure: in the DAL the term is matched with a parameterized
whereILikewhose%/_wildcards are escaped viasanitizeSqlLikeString, so user input cannot break out of the LIKE pattern or inject SQL. This PR relaxes the filter to a trimmed string bounded at 255 characters — the same shape the identity search endpoint (/api/v2/identities/search) already uses for itsnamefilter.Steps to verify the change
My Project.My Project(with the space).Type
Checklist