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

Check that the argument to EJSON.parse is a string. #1402

Closed
wants to merge 1 commit into from

Conversation

awwx
Copy link
Contributor

@awwx awwx commented Sep 5, 2013

Some Android browser versions of JSON.parse can crash when passed null
(https://code.google.com/p/android/issues/detail?id=11973), so it's
better not to pass on a non-string argument to JSON.parse.

Thanks to @raix for raising the issue in #1401.

Some Android browser versions of JSON.parse can crash when passed null
(https://code.google.com/p/android/issues/detail?id=11973), so it's
better not to pass on a non-string argument to JSON.parse.

Thanks to @raix for raising the issue in meteor#1401.
@raix
Copy link
Contributor

raix commented Sep 6, 2013

Thanks Andrew!

@glasser
Copy link
Contributor

glasser commented Sep 12, 2013

That blocks String objects. Which admittedly are annoying and other places in Meteor don't consider them as strings (eg check). So maybe that's fine.

@glasser
Copy link
Contributor

glasser commented Sep 12, 2013

Thanks, merged.

@glasser glasser closed this Sep 12, 2013
@awwx
Copy link
Contributor Author

awwx commented Sep 12, 2013

Yeah, does anybody use String objects for anything? You could have a policy to convert String objects to string primitives in entry points to the public API... but that would make sense only if anyone actually wanted to use String objects.

@raix
Copy link
Contributor

raix commented Sep 12, 2013

Well I kinda did use String guys, thanks, but nice to know that Meteor likes strings as primitive better than objects.

@awwx
Copy link
Contributor Author

awwx commented Sep 12, 2013

nice to know that Meteor likes strings as primitive better than objects

I don't know if calling Meteor API functions with String objects would in fact cause any problems, but there's no unit test coverage for it at least.

@awwx awwx deleted the ejson-parse-check-argument branch March 31, 2016 15:50
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