Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

fix(SearchParameters): ignore invalid parameters #880

Merged
merged 2 commits into from Oct 19, 2021
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Oct 15, 2021

These parameters could be used maliciously, so are explicilty not allowed in merge

These parameters could be used maliciously, so are explicilty not allowed in merge
@Haroenv Haroenv requested review from a team, dhayab and tkrugg and removed request for a team October 15, 2021 11:35
test/spec/functions/merge.js Show resolved Hide resolved
test/spec/functions/merge.js Outdated Show resolved Hide resolved
test/spec/functions/merge.js Show resolved Hide resolved
test/spec/functions/defaultsPure.js Outdated Show resolved Hide resolved
test/spec/functions/defaultsPure.js Show resolved Hide resolved
@Haroenv Haroenv merged commit 4ff542b into develop Oct 19, 2021
@Haroenv Haroenv deleted the fix/prototype branch October 19, 2021 14:00
Haroenv added a commit that referenced this pull request Oct 19, 2021
 * fix(SearchParameters): ignore invalid parameters (#880) 4ff542b
Haroenv added a commit that referenced this pull request Jan 9, 2023
If a user-provided search parameter is used to instantiate search parameters, it was possible to construct it in such a way that `constructor.prototype` is attempted to be written. That throws an error, but if the error would be caught, the resulting injection still happened.

This PR fixes that (small) vulnerability by ensuring `constructor`, is skipped, just like `__proto__`.

fixes #922

This is similar/a follow-up to #880
Haroenv added a commit that referenced this pull request Jan 9, 2023
If a user-provided search parameter is used to instantiate search parameters, it was possible to construct it in such a way that `constructor.prototype` is attempted to be written. That throws an error, but if the error would be caught, the resulting injection still happened.

This PR fixes that (small) vulnerability by ensuring `constructor`, is skipped, just like `__proto__`.

fixes #922

This is similar/a follow-up to #880
dhayab pushed a commit to algolia/instantsearch that referenced this pull request Jul 10, 2023
…ch-helper-js#880)

* fix(SearchParameters): ignore invalid parameters

These parameters could be used maliciously, so are explicilty not allowed in merge

* clearer test
dhayab pushed a commit to algolia/instantsearch that referenced this pull request Jul 10, 2023
dhayab pushed a commit to algolia/instantsearch that referenced this pull request Jul 10, 2023
…search-helper-js#923)

If a user-provided search parameter is used to instantiate search parameters, it was possible to construct it in such a way that `constructor.prototype` is attempted to be written. That throws an error, but if the error would be caught, the resulting injection still happened.

This PR fixes that (small) vulnerability by ensuring `constructor`, is skipped, just like `__proto__`.

fixes algolia/algoliasearch-helper-js#922

This is similar/a follow-up to algolia/algoliasearch-helper-js#880
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants