lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go
MIT License
275 stars 126 forks source link

check type on action in call and add test #220

Closed sbindzau closed 1 year ago

sbindzau commented 1 year ago

Check the type of the action parameter to prevent crashes from a bad call.

sbindzau commented 1 year ago

I don't understand why the websocket test fails here. I haven't made any changes to it.

lorenzodonini commented 1 year ago

I don't understand why the websocket test fails here. I haven't made any changes to it.

I'm not sure either, but it's a tricky test as it uses self-signed certificates and tests a specific error in the TLS handshake (I've seen this error before). Either way, it's not your code's fault. Will have a look to figure out why the error is showing up.

Thanks for the fix!