peerjs-server icon indicating copy to clipboard operation
peerjs-server copied to clipboard

Implement payload validation

Open prabhu opened this issue 5 years ago • 0 comments

Thank you for this library.

While reviewing this project with ShiftLeft, I came across an insight pointing to this code

https://github.com/peers/peerjs-server/blob/master/src/api/v1/calls/index.ts#L20

It appears like the payload object has no type, sanitization or validation anywhere in the server and is left purely to the end client application to perform their own. It will be nice if there is a possibility to add some default validators and ability to add custom validators since it is not clear if all end user applications have both sanitization and validation.

prabhu avatar Jul 27 '20 14:07 prabhu