Skip to content

FIX(security): validate URL search parameter schema before Redux store injection (#2319) - #2333

Open
Talha12Shiekh wants to merge 1 commit into
appbaseio:nextfrom
Talha12Shiekh:fix/security-url-params-validation
Open

FIX(security): validate URL search parameter schema before Redux store injection (#2319)#2333
Talha12Shiekh wants to merge 1 commit into
appbaseio:nextfrom
Talha12Shiekh:fix/security-url-params-validation

Conversation

@Talha12Shiekh

Copy link
Copy Markdown

Proposed Changes

Added URL parameter schema validation helpers (isValidURLValue and isValidParsedParam) in packages/web/src/components/basic/ReactiveBase.js to strictly validate parsed JSON query parameters before injecting them as initial selectedValues into the Redux store:

  • Validates primitive types (string, number, boolean), primitive arrays, or expected object structures ({ value, category }).
  • Rejects arbitrary object structures, prototype pollution attempts, or unexpected payload shapes parsed from URL query parameters.

Linked Issues

Checklist

  • Describe the proposed changes and how it'll improve the library experience.
  • Please make sure that there are no linting errors in the code.
  • Add a demo video/gif/screenshot to explain how did you test the fix.
  • If it is a global change, try to add any side effects that it could have.
  • Create a PR to add/update the docs (if needed) at here.
  • Create a PR to add/update the storybook (if needed) at here.

Improvements to the Library Experience

  • Security: Prevents malicious/crafted URL parameter structures from polluting application state or triggering unexpected behavior in downstream components.

Side Effects

  • None. Valid search parameter values (primitives, arrays, and { value, category } objects) continue to function as expected.

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.

security: user-controlled URL params injected directly into Redux store via JSON.parse

1 participant