Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

ciao-controller should use checked type assertions #1528

Open
markdryan opened this issue Oct 16, 2017 · 1 comment
Open

ciao-controller should use checked type assertions #1528

markdryan opened this issue Oct 16, 2017 · 1 comment

Comments

@markdryan
Copy link
Contributor

There are a number of places in api/api.go where ciao-controller is used non-checked type assertions to convert data received from a client into some other type, usually a map[string]interface{}.

There's no guarantee that this conversion will work, if for example the client sends a json document containing a single int. In this case ciao-controller will panic.

@markdryan
Copy link
Contributor Author

@markdryan markdryan changed the title ciao-controller should used checked type assertions ciao-controller should use checked type assertions Oct 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant