WebSocket clients may have access to sensitive the methods registered in connector/api.go.
The suggested solution is to protect client-facing methods with an 'isUntrustedConnection' check. Or register CommandRegistry in a separate api.
func (api *API) SignAccepted(ctx context.Context,args commands.SignAcceptedArgs) error {
if IsUntrustedConnection(ctx) {
return ...
}
return api.c.SignAccepted(args)
}
https://github.com/status-im/status-go/blob/develop/services/connector/api.go#L103