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
If organization name passed in TransferCredential RPC is not a name of saved organization ("org1"),
dlogMap["p"]returns nil, which causespanic: interface conversion: interface {} is nil, not stringhere:emmy/config/config.go
Line 114 in ee2f257
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