Language: JavaScript
Label: vulnerable
CWE: CWE-331 \u2014 Insufficient Entropy
The product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others.

Code:
    function default_1(_a) {
        var subscribeEndpoint = _a.subscribeEndpoint, leaveEndpoint = _a.leaveEndpoint, heartbeatEndpoint = _a.heartbeatEndpoint, setStateEndpoint = _a.setStateEndpoint, timeEndpoint = _a.timeEndpoint, getFileUrl = _a.getFileUrl, config = _a.config, crypto = _a.crypto, listenerManager = _a.listenerManager;
        this._listenerManager = listenerManager;
        this._config = config;
        this._leaveEndpoint = leaveEndpoint;
        this._heartbeatEndpoint = heartbeatEndpoint;
        this._setStateEndpoint = setStateEndpoint;
        this._subscribeEndpoint = subscribeEndpoint;
        this._getFileUrl = getFileUrl;
        this._crypto = crypto;
        this._channels = {};
        this._presenceChannels = {};
        this._heartbeatChannels = {};
        this._heartbeatChannelGroups = {};
        this._channelGroups = {};
        this._presenceChannelGroups = {};
        this._pendingChannelSubscriptions = [];
        this._pendingChannelGroupSubscriptions = [];
        this._currentTimetoken = 0;
        this._lastTimetoken = 0;
        this._storedTimetoken = null;
        this._subscriptionStatusAnnounced = false;
        this._isOnline = true;
        this._reconnectionManager = new reconnection_manager_1.default({ timeEndpoint: timeEndpoint });
        this._dedupingManager = new deduping_manager_1.default({ config: config });
    }