Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__proto__ disappears from the inverted index if you serialize an index that was loaded from a serialized JSON blob #378

Merged
merged 2 commits into from
Oct 16, 2018

Conversation

hoelzro
Copy link
Contributor

@hoelzro hoelzro commented Oct 13, 2018

Test and fix included - details are in the commit messages

I found while using lunr that __proto__ can slip through the
serialization process if you're serializing an index that was
itself loaded from a serialized index - it might not be a bad idea
to make sure that serializing an index loaded from a JSON blob
serializes to the exact same JSON blob (well, forgiving things like
a change in the order of the keys)
Fixes the issue where __proto__ is dropped from the inverted index
after a second deserializatoin
@hoelzro hoelzro changed the title __proto__ disappears from the inverted index if you serialize an index that wsa loaded from a serialized JSON blob __proto__ disappears from the inverted index if you serialize an index that was loaded from a serialized JSON blob Oct 14, 2018
hoelzro added a commit to hoelzro/tw-full-text-search that referenced this pull request Oct 15, 2018
@olivernn olivernn merged commit 08a2bab into olivernn:master Oct 16, 2018
@olivernn
Copy link
Owner

I'll put together a release that includes this change just now. Changes are in master. Thanks.

@olivernn
Copy link
Owner

2.3.4 has been published to NPM.

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.

None yet

2 participants