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

[DRAFT] validate deep nesting #394

Closed
wants to merge 3 commits into from

Conversation

pjfanning
Copy link
Member

@pjfanning pjfanning marked this pull request as draft March 5, 2023 12:10
@@ -1403,11 +1409,16 @@ public ByteArrayBuilder _getByteArrayBuilder()
return _byteArrayBuilder;
}

protected void _startArray(CsvSchema.Column column)
protected void _startArray(CsvSchema.Column column) throws UncheckedIOException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this not to expose IOException?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed just now - I'm not sure if this PR is really useful though, I can't really see how you can nest CSV or JavaProperties - I'm going to concentrate on use cases like Smile and CBOR first - YAML is covered by SnakeYAML LoaderOPtions (so like jackson-dataformat-xml, the argument is if we need 2 ways to police the depth, SnakeYAML has a default depth limit of 50).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Yeah, good point. In theory in future we might create nested Objects etc. But even then... seems unlikely & can cross that bridge if we get there.

For Properties it's bit different since there is the path splitting so one can actually create keys to create whatever depth.

And YAML is interesting as limits are needed but... provided natively. So can/should postpone handling changes there too I think.

TOML, once again is... its own thing.

So I think Properties are one to consider, yet less important than Smile, CBOR. Can't do it for Ion I suspect.
Protobuf doesn't have constructs for infinite recursion I don't think?

@pjfanning
Copy link
Member Author

closing in favour of #397

@pjfanning pjfanning closed this Mar 7, 2023
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