Skip to content

security(routing): validate route params before detail fetches#357

Closed
abdrassulov wants to merge 2 commits into
Grainlify:mainfrom
abdrassulov:security/validate-route-params
Closed

security(routing): validate route params before detail fetches#357
abdrassulov wants to merge 2 commits into
Grainlify:mainfrom
abdrassulov:security/validate-route-params

Conversation

@abdrassulov

Copy link
Copy Markdown
Contributor

📌 Description

This PR implements a centralized validation helper and uses it to validate route-level path parameters (such as , , and ) before passing them to the apiRequest clients on the detail pages. This prevents client-side path traversal and XSS injection attempts.

✅ Solution

  • Implemented under validating string length and patterns.
  • Enforces strict character whitelisting (alphanumeric, hyphens, underscores) rejecting dot, slash, backslash, and URL-encoded variants (%2e, %2f).
  • Integrates validation into and route wrappers.
  • Covered validation logic with 49 unit tests in .

@Jagadeeshftw

Copy link
Copy Markdown
Contributor

hey @abdrassulov, thanks for the contribution! closing this one because we couldn't find a linked issue. to keep things organized: please comment on an open issue to get assigned first, then raise your pr referencing it. happy to see you back once you've been assigned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants