Fix a bug with unsafe properties#408
Merged
snewcomer merged 2 commits intoadopted-ember-addons:masterfrom Jan 17, 2020
Merged
Conversation
added 2 commits
January 17, 2020 19:27
The test is failing on current implementation
possibleKeys were shared between the branches during the traverse.
Each node could push to it making it polluted for the next branch.
Source like: {a: {}, b: {c: {}}} could produce paths like:
['a', 'a.b.c'] instead of ['a', 'b.c'];
snewcomer
approved these changes
Jan 17, 2020
Collaborator
snewcomer
left a comment
There was a problem hiding this comment.
Phenomenal! Thank you thank you 🙇
| assert.deepEqual(value, { company: { employees: ['Jull', 'Olafur']} }, 'has right employees'); | ||
| }); | ||
|
|
||
| test('it works with unsafe properties', async function(assert) { |
Collaborator
There was a problem hiding this comment.
What do you mean by "unsafe" here? Just curious b/c we also use this term to reference prototype poisoning in this codebase
Author
There was a problem hiding this comment.
I wasn't sure about the term, I used exactly the same term I found in the source code. I didn't find tests which were testing that branch of logic, so I've tried to "reverse engineer" the code to make tests go through that branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
possibleKeys were shared between the branches during the traverse.
Each node could push to it making it polluted for the next branch.
Source like: {a: {}, b: {c: {}}} could produce paths like:
['a', 'a.b.c'] instead of ['a', 'b.c'];