Add warning message about JSONRPC

This commit is contained in:
Jerko Steiner 2019-08-30 16:26:27 +07:00
parent 5cc20ccd8e
commit b8fb7c2eba

View File

@ -157,6 +157,10 @@ export const createRpcService = <T, M extends FunctionPropertyNames<T>>(
await validateServiceContext(id, service, method, context)
// FIXME TODO if user specified too many parameters in the request,
// they might override the context argument! this is dangerous as it
// could allow them to set any userId they would like. We should compare
// method arguments length before invoking this function.
let retValue = (rpcService[method] as any)(...params, context)
if (typeof retValue === 'function') {