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

Server crashes if invalid organization name is passed #36

Open
zitnik opened this issue Nov 8, 2017 · 1 comment
Open

Server crashes if invalid organization name is passed #36

zitnik opened this issue Nov 8, 2017 · 1 comment

Comments

@zitnik
Copy link
Contributor

zitnik commented Nov 8, 2017

If organization name passed in TransferCredential RPC is not a name of saved organization ("org1"), dlogMap["p"] returns nil, which causes
panic: interface conversion: interface {} is nil, not string here:

h1, _ := new(big.Int).SetString(org["h1"].(string), 10)

I assume the same would happen on other functions loading configuration parameters.

I suggest checking if the organization exists, returning nil, and handling that in higher functions as well, so that the server returns a request error.

The issue can be reproduced with the demo Android app pushed here:
https://github.com/zitnik/emmy-demo-android/tree/invalid-org-test

@mancabizjak
Copy link
Contributor

I have some work under way that will check for these sorts of errors when invalid configuration is passed; this concerns the way in which configuration will be handled in general, not only for this particular case.

In addition, as discussed offline, it probably doesn't make sense for the same verifier to support multiple organizations, as each verifier runs on behalf of a single organization, so all references to organization names will also be removed.

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

2 participants