Skip to content

Server crashes if invalid organization name is passed #36

Description

@zitnik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions