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

make bind ignore test methods #14

Open
iansmith opened this issue Jan 3, 2023 · 0 comments
Open

make bind ignore test methods #14

iansmith opened this issue Jan 3, 2023 · 0 comments

Comments

@iansmith
Copy link
Owner

iansmith commented Jan 3, 2023

Bind() should ignore attempts to bind a method that is not actually in the set of methods. It should probably issue a warning when it detects this situation.

Consider a .proto which says that foo() is a test method. That method may be implemented in some service (say bar) but not intended for use in prod. A nefarious person could try to bind foo() and then invoke it, which would be bad if the author of foo() expected it to only exist in a test situation.

This problem is really nasty because the decision of "is foo a test method()" is made at the time the code is generated and (intentionally) does not distinguish between test and normal methods so the tests can "work normally" without a bunch of shenanigans. The problem is that we would need to have a way to know when a bind is issued if it is legal or not, which at some level is going to need the .proto definition.

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

1 participant