botframework-webchat-core
Advanced tools
Comparing version 4.2.1-master.b341439 to 4.2.1-master.b34fa87
@@ -189,4 +189,4 @@ "use strict"; | ||
exports.Constants = Constants; | ||
var version = "4.2.1-master.b341439"; | ||
var version = "4.2.1-master.b34fa87"; | ||
exports.version = version; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJDb25zdGFudHMiLCJBY3Rpdml0eUNsaWVudFN0YXRlIiwiRGljdGF0ZVN0YXRlIiwidmVyc2lvbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFFQTs7QUFDQTs7QUFFQSxJQUFNQSxTQUFTLEdBQUc7QUFBRUMsRUFBQUEsbUJBQW1CLEVBQW5CQSxtQkFBRjtBQUF1QkMsRUFBQUEsWUFBWSxFQUFaQTtBQUF2QixDQUFsQjs7QUFDQSxJQUFNQyxPQUFPLHlCQUFiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbm5lY3QgZnJvbSAnLi9hY3Rpb25zL2Nvbm5lY3QnO1xuaW1wb3J0IGNyZWF0ZVN0b3JlIGZyb20gJy4vY3JlYXRlU3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b3BEaWN0YXRlLFxuICBzdG9wU3BlYWtpbmdBY3Rpdml0eSxcbiAgc3VibWl0U2VuZEJveCxcbiAgdmVyc2lvblxufVxuIl19 |
@@ -16,2 +16,4 @@ "use strict"; | ||
var _mathRandom = _interopRequireDefault(require("math-random")); | ||
var _callUntil = _interopRequireDefault(require("./effects/callUntil")); | ||
@@ -43,4 +45,7 @@ | ||
var ENDED = 5; | ||
var DEFAULT_USER_ID = 'default-user'; | ||
function randomUserID() { | ||
return "r_".concat((0, _mathRandom.default)().toString(36).substr(2, 10)); | ||
} | ||
function _callee() { | ||
@@ -73,10 +78,10 @@ var _ref, _ref$payload, directLine, userID, token, _ref2, userIDFromToken, connectTask; | ||
console.warn('Web Chat: user ID must be a string.'); | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} else if (/^dl_/.test(userID)) { | ||
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.'); | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} | ||
} else { | ||
// Only specify "default-user" if not found from token and not passed in | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} | ||
@@ -297,2 +302,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYWdhcy9jb25uZWN0U2FnYS5qcyJdLCJuYW1lcyI6WyJjb25uZWN0U2FnYSIsImRpc2Nvbm5lY3RTYWdhIiwiT05MSU5FIiwiRU5ERUQiLCJERUZBVUxUX1VTRVJfSUQiLCJDT05ORUNUIiwicGF5bG9hZCIsImRpcmVjdExpbmUiLCJ1c2VySUQiLCJ0b2tlbiIsInVzZXJJREZyb21Ub2tlbiIsInVzZXIiLCJjb25zb2xlIiwid2FybiIsInRlc3QiLCJjb25uZWN0VGFzayIsIkRJU0NPTk5FQ1QiLCJtZXRhIiwidHlwZSIsIkNPTk5FQ1Rf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VELCBlcnJvcjogdHJ1ZSwgcGF5bG9hZDogZXJyIH0pO1xuICB9IGZpbmFsbHkge1xuICAgIGlmICh5aWVsZCBjYW5jZWxsZWQoKSkge1xuICAgICAgeWllbGQgcHV0KHsgdHlwZTogRElTQ09OTkVDVF9SRUpFQ1RFRCwgZXJyb3I6IHRydWUsIHBheWxvYWQ6IG5ldyBFcnJvcignY2FuY2VsbGVkJykgfSk7XG4gICAgfVxuXG4gICAgdW5zdWJzY3JpYmUoKTtcbiAgfVxufVxuIl19 |
{ | ||
"name": "botframework-webchat-core", | ||
"version": "4.2.1-master.b341439", | ||
"version": "4.2.1-master.b34fa87", | ||
"description": "Core of botframework-webchat", | ||
@@ -64,2 +64,3 @@ "main": "lib/index.js", | ||
"jsonwebtoken": "^8.3.0", | ||
"math-random": "^1.0.4", | ||
"mime": "^2.3.1", | ||
@@ -66,0 +67,0 @@ "redux": "^4.0.0", |
@@ -11,2 +11,3 @@ import { | ||
import { decode } from 'jsonwebtoken'; | ||
import random from 'math-random'; | ||
@@ -40,3 +41,5 @@ import callUntil from './effects/callUntil'; | ||
const DEFAULT_USER_ID = 'default-user'; | ||
function randomUserID() { | ||
return `r_${ random().toString(36).substr(2, 10) }`; | ||
} | ||
@@ -58,10 +61,10 @@ export default function* () { | ||
console.warn('Web Chat: user ID must be a string.'); | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} else if (/^dl_/.test(userID)) { | ||
console.warn('Web Chat: user ID prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.'); | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} | ||
} else { | ||
// Only specify "default-user" if not found from token and not passed in | ||
userID = DEFAULT_USER_ID; | ||
userID = randomUserID(); | ||
} | ||
@@ -68,0 +71,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
326841
5032
8
+ Addedmath-random@^1.0.4
+ Addedmath-random@1.0.4(transitive)