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

suite.js performs unsafe Object iterations without hasOwnProperty #175

Closed
wants to merge 3 commits into from
Closed

Conversation

Sembiance
Copy link

Even in node.js, it's possible that the Object prototype can be modified with additional properties.

When this happens it is causing vows to fail because vows isn't checking hasOwnProperty() to ensure it's a real property.

This pull request adds the two checks needed in suite.js

I've run npm test and tests pass.

This pull request is ready to be merged.

…xternal Object prototype manipulations can't cause vows to break
@Prinzhorn
Copy link

I think your code still doesn't nail it 100%.

if (Object.prototype.hasOwnProperty.call(options, k))

@Sembiance
Copy link
Author

@Prinzhorn

fixed

@mmalecki mmalecki closed this in 4347cdd Jun 18, 2012
@mmalecki
Copy link

I went with 4347cdd, but thanks!

@Sembiance
Copy link
Author

@mmalecki that works too! Thanks for fixing this, I can now use the official vows module instead of my fork :)

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

3 participants