Socket
Socket
Sign inDemoInstall

pubnub

Package Overview
Dependencies
Maintainers
4
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pubnub - npm Package Compare versions

Comparing version 4.2.2 to 4.2.3

2

bower.json
{
"name": "pubnub",
"version": "4.2.2",
"version": "4.2.3",
"main": "dist/web/pubnub.min.js",

@@ -5,0 +5,0 @@ "license": "https://github.com/pubnub/javascript/blob/master/LICENSE",

## [v4.2.3](https://github.com/pubnub/javascript/tree/v4.2.3)
[Full Changelog](https://github.com/pubnub/javascript/compare/v4.2.2...v4.2.3)
- ⭐fixes on encoding of apostraphes.
## [v4.2.2](https://github.com/pubnub/javascript/tree/v4.2.2)

@@ -12,2 +22,6 @@

- ⭐add hooks to stop polling time when the number of subscriptions drops to 0 (@jasonpoe)
## [v4.2.1](https://github.com/pubnub/javascript/tree/v4.2.1)

@@ -14,0 +28,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -42,3 +46,3 @@

return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup);
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + _utils2.default.encodeString(channelGroup);
}

@@ -45,0 +49,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -40,3 +44,3 @@

return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup) + '/remove';
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + _utils2.default.encodeString(channelGroup) + '/remove';
}

@@ -43,0 +47,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -40,3 +44,3 @@

return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup);
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + _utils2.default.encodeString(channelGroup);
}

@@ -43,0 +47,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -42,3 +46,3 @@

return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup);
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + _utils2.default.encodeString(channelGroup);
}

@@ -45,0 +49,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -53,3 +57,3 @@

return '/v2/history/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(channel);
return '/v2/history/sub-key/' + config.subscribeKey + '/channel/' + _utils2.default.encodeString(channel);
}

@@ -56,0 +60,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -42,3 +46,3 @@

var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/uuid/' + uuid;
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + _utils2.default.encodeString(stringifiedChannels) + '/uuid/' + uuid;
}

@@ -45,0 +49,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -40,3 +44,3 @@

var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/heartbeat';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + _utils2.default.encodeString(stringifiedChannels) + '/heartbeat';
}

@@ -43,0 +47,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -45,3 +49,3 @@

var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
baseURL += '/channel/' + encodeURIComponent(stringifiedChannels);
baseURL += '/channel/' + _utils2.default.encodeString(stringifiedChannels);
}

@@ -48,0 +52,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -40,3 +44,3 @@

var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/leave';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + _utils2.default.encodeString(stringifiedChannels) + '/leave';
}

@@ -43,0 +47,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -42,3 +46,3 @@

var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/uuid/' + config.UUID + '/data';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + _utils2.default.encodeString(stringifiedChannels) + '/uuid/' + config.UUID + '/data';
}

@@ -45,0 +49,0 @@

@@ -26,2 +26,6 @@ 'use strict';

var _utils = require('../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -71,3 +75,3 @@

var stringifiedPayload = prepareMessagePayload(modules, message);
return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + encodeURIComponent(channel) + '/0/' + encodeURIComponent(stringifiedPayload);
return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + _utils2.default.encodeString(channel) + '/0/' + _utils2.default.encodeString(stringifiedPayload);
}

@@ -79,3 +83,3 @@

return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + encodeURIComponent(channel) + '/0';
return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + _utils2.default.encodeString(channel) + '/0';
}

@@ -82,0 +86,0 @@

@@ -20,2 +20,6 @@ 'use strict';

var _utils = require('../utils');
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -40,3 +44,3 @@

var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/subscribe/' + config.subscribeKey + '/' + encodeURIComponent(stringifiedChannels) + '/0';
return '/v2/subscribe/' + config.subscribeKey + '/' + _utils2.default.encodeString(stringifiedChannels) + '/0';
}

@@ -43,0 +47,0 @@

@@ -43,3 +43,9 @@ 'use strict';

module.exports = { signPamFromParams: signPamFromParams, endsWith: endsWith, createPromise: createPromise };
function encodeString(input) {
return encodeURIComponent(input).replace(/[!~\*'\(\)]/g, function (x) {
return '%' + x.charCodeAt(0).toString(16);
});
}
module.exports = { signPamFromParams: signPamFromParams, endsWith: endsWith, createPromise: createPromise, encodeString: encodeString };
//# sourceMappingURL=utils.js.map
{
"name": "pubnub",
"preferGlobal": false,
"version": "4.2.2",
"version": "4.2.3",
"author": "PubNub <support@pubnub.com>",

@@ -6,0 +6,0 @@ "description": "Publish & Subscribe Real-time Messaging with PubNub",

@@ -21,3 +21,3 @@ # PubNub JavaScript SDK (V4)

## CDN Links
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.2.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.2.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.3.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.3.js

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -23,3 +24,3 @@ export function getOperation(): string {

let { config } = modules;
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup);
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + utils.encodeString(channelGroup);
}

@@ -26,0 +27,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -22,3 +23,3 @@ export function getOperation(): string {

let { config } = modules;
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup) + '/remove';
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + utils.encodeString(channelGroup) + '/remove';
}

@@ -25,0 +26,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -22,3 +23,3 @@ export function getOperation(): string {

let { config } = modules;
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup);
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + utils.encodeString(channelGroup);
}

@@ -25,0 +26,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -23,3 +24,3 @@ export function getOperation(): string {

let { config } = modules;
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + encodeURIComponent(channelGroup);
return '/v1/channel-registration/sub-key/' + config.subscribeKey + '/channel-group/' + utils.encodeString(channelGroup);
}

@@ -26,0 +27,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../constants/operations';
import utils from '../utils';

@@ -33,3 +34,3 @@ function __processMessage(modules, message: Object): Object | null {

let { config } = modules;
return '/v2/history/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(channel);
return '/v2/history/sub-key/' + config.subscribeKey + '/channel/' + utils.encodeString(channel);
}

@@ -36,0 +37,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -21,3 +22,3 @@ export function getOperation(): string {

let stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/uuid/' + uuid;
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + utils.encodeString(stringifiedChannels) + '/uuid/' + uuid;
}

@@ -24,0 +25,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -21,3 +22,3 @@ export function getOperation(): string {

let stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/heartbeat';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + utils.encodeString(stringifiedChannels) + '/heartbeat';
}

@@ -24,0 +25,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -24,3 +25,3 @@ export function getOperation(): string {

let stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
baseURL += '/channel/' + encodeURIComponent(stringifiedChannels);
baseURL += '/channel/' + utils.encodeString(stringifiedChannels);
}

@@ -27,0 +28,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -21,3 +22,3 @@ export function getOperation(): string {

let stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/leave';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + utils.encodeString(stringifiedChannels) + '/leave';
}

@@ -24,0 +25,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../../constants/operations';
import utils from '../../utils';

@@ -23,3 +24,3 @@ export function getOperation(): string {

let stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + encodeURIComponent(stringifiedChannels) + '/uuid/' + config.UUID + '/data';
return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + utils.encodeString(stringifiedChannels) + '/uuid/' + config.UUID + '/data';
}

@@ -26,0 +27,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../constants/operations';
import utils from '../utils';

@@ -40,3 +41,3 @@ function prepareMessagePayload(modules, messagePayload) {

let stringifiedPayload = prepareMessagePayload(modules, message);
return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + encodeURIComponent(channel) + '/0/' + encodeURIComponent(stringifiedPayload);
return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + utils.encodeString(channel) + '/0/' + utils.encodeString(stringifiedPayload);
}

@@ -47,3 +48,3 @@

const { channel } = incomingParams;
return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + encodeURIComponent(channel) + '/0';
return '/publish/' + config.publishKey + '/' + config.subscribeKey + '/0/' + utils.encodeString(channel) + '/0';
}

@@ -50,0 +51,0 @@

@@ -5,2 +5,3 @@ /* @flow */

import operationConstants from '../constants/operations';
import utils from '../utils';

@@ -21,3 +22,3 @@ export function getOperation(): string {

let stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
return '/v2/subscribe/' + config.subscribeKey + '/' + encodeURIComponent(stringifiedChannels) + '/0';
return '/v2/subscribe/' + config.subscribeKey + '/' + utils.encodeString(stringifiedChannels) + '/0';
}

@@ -24,0 +25,0 @@

@@ -37,2 +37,6 @@ /* @flow */

module.exports = { signPamFromParams, endsWith, createPromise };
function encodeString(input: string): string {
return encodeURIComponent(input).replace(/[!~\*'\(\)]/g, x => '%' + x.charCodeAt(0).toString(16));
}
module.exports = { signPamFromParams, endsWith, createPromise, encodeString };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc