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

Add validation for XDR fields with limits #1

Open
ire-and-curses opened this issue Mar 8, 2019 · 4 comments
Open

Add validation for XDR fields with limits #1

ire-and-curses opened this issue Mar 8, 2019 · 4 comments

Comments

@ire-and-curses
Copy link
Member

Fields like xdr.SetOptionsOp.HomeDomain have restrictions on size, but at run-time nothing prevents them from being set too large, which causes transaction_malformed errors.

It looks like the XDR library has defined sizes which can be checked (e.g. this one for homeDomain strings). They just need to be checked.

@bartekn Does that sound right to you?

@tomerweller
Copy link

This looks like it belongs in https://github.com/stellar/go-xdr?

@bartekn
Copy link

bartekn commented Mar 12, 2019

You both are right. It looks like xdrmaxsize tag is only checked while decoding. And it belongs to go-xdr.

@bartekn
Copy link

bartekn commented Mar 12, 2019

@tomquisel can you transfer this issue using "Transfer issue" feature? It's only available for admins. Has to be moved to stellar/go-xdr.

@tomquisel tomquisel transferred this issue from stellar/go Mar 12, 2019
@tomquisel
Copy link

@bartekn done! Issues were disabled for go-xdr, so I couldn't transfer this issue either at first. Issues are now enabled so it worked 😄

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

No branches or pull requests

4 participants