Jelajahi Sumber

Upgrade to Strophe 1.3.2

JC Brand 6 tahun lalu
induk
melakukan
d87551328d
4 mengubah file dengan 65 tambahan dan 12 penghapusan
  1. 1 1
      CHANGES.md
  2. 60 7
      dist/converse.js
  3. 3 3
      package-lock.json
  4. 1 1
      src/headless/package.json

+ 1 - 1
CHANGES.md

@@ -3,7 +3,7 @@
 ## 4.1.3 (Unreleased)
 
 - Updated translation: lt
-- Upgrade to Backbone 1.4.0
+- Upgrade to Backbone 1.4.0 and Strophe 1.3.2
 - Fix "flashing" of roster filter when you have less than 5 roster contacts.
 - Fix handling of CAPTCHAs offered by ejabberd.
 - Don't send out receipts or markers for MAM messages

+ 60 - 7
dist/converse.js

@@ -36772,6 +36772,37 @@ return /******/ (function(modules) { // webpackBootstrap
 /************************************************************************/
 /******/ ({
 
+/***/ "./node_modules/webpack/buildin/global.js":
+/*!***********************************!*\
+  !*** (webpack)/buildin/global.js ***!
+  \***********************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+	return this;
+})();
+
+try {
+	// This works if eval is allowed (see CSP)
+	g = g || Function("return this")() || (1, eval)("this");
+} catch (e) {
+	// This works if the window reference is available
+	if (typeof window === "object") g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+
 /***/ "./src/bosh.js":
 /*!*********************!*\
   !*** ./src/bosh.js ***!
@@ -37769,13 +37800,22 @@ Strophe.Bosh.prototype = {
 /*!*********************!*\
   !*** ./src/core.js ***!
   \*********************/
-/*! exports provided: default */
+/*! exports provided: Strophe, $build, $iq, $msg, $pres, SHA1, MD5, default */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Strophe", function() { return Strophe; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$build", function() { return $build; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$iq", function() { return $iq; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$msg", function() { return $msg; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$pres", function() { return $pres; });
 /* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! md5 */ "./src/md5.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MD5", function() { return md5__WEBPACK_IMPORTED_MODULE_0__["default"]; });
+
 /* harmony import */ var sha1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! sha1 */ "./src/sha1.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SHA1", function() { return sha1__WEBPACK_IMPORTED_MODULE_1__["default"]; });
+
 /* harmony import */ var utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils */ "./src/utils.js");
 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
 
@@ -37866,7 +37906,7 @@ function $pres(attrs) {
 
 var Strophe = {
   /** Constant: VERSION */
-  VERSION: "1.3.0",
+  VERSION: "1.3.2",
 
   /** Constants: XMPP Namespace Constants
    *  Common namespace constants from the XMPP RFCs and XEPs.
@@ -41324,7 +41364,7 @@ Strophe.SASLSHA1.prototype.test = function (connection) {
 };
 
 Strophe.SASLSHA1.prototype.onChallenge = function (connection, challenge, test_cnonce) {
-  var cnonce = test_cnonce || md5__WEBPACK_IMPORTED_MODULE_0__["default"].hexdigest(Math.random() * 1234567890);
+  var cnonce = test_cnonce || md5__WEBPACK_IMPORTED_MODULE_0__["default"].hexdigest("" + Math.random() * 1234567890);
   var auth_str = "n=" + utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(connection.authcid);
   auth_str += ",r=";
   auth_str += cnonce;
@@ -41558,6 +41598,7 @@ Strophe.SASLXOAuth2.prototype.onChallenge = function (connection) {
   return utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(auth_str);
 };
 
+
 /* harmony default export */ __webpack_exports__["default"] = ({
   'Strophe': Strophe,
   '$build': $build,
@@ -41620,6 +41661,10 @@ var bit_rol = function bit_rol(num, cnt) {
 
 
 var str2binl = function str2binl(str) {
+  if (typeof str !== "string") {
+    throw new Error("str2binl was passed a non-string");
+  }
+
   var bin = [];
 
   for (var i = 0; i < str.length * 8; i += 8) {
@@ -42024,14 +42069,22 @@ var SHA1 = {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony import */ var bosh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! bosh */ "./src/bosh.js");
-/* harmony import */ var websocket__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! websocket */ "./src/websocket.js");
-/* harmony import */ var core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core */ "./src/core.js");
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return core__WEBPACK_IMPORTED_MODULE_2__["default"]; });
+/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core */ "./src/core.js");
+/* harmony import */ var bosh__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bosh */ "./src/bosh.js");
+/* harmony import */ var websocket__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! websocket */ "./src/websocket.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return core__WEBPACK_IMPORTED_MODULE_0__["default"]; });
+
+/*global global*/
 
 
 
+global.Strophe = core__WEBPACK_IMPORTED_MODULE_0__["default"].Strophe;
+global.$build = core__WEBPACK_IMPORTED_MODULE_0__["default"].$build;
+global.$iq = core__WEBPACK_IMPORTED_MODULE_0__["default"].$iq;
+global.$msg = core__WEBPACK_IMPORTED_MODULE_0__["default"].$msg;
+global.$pres = core__WEBPACK_IMPORTED_MODULE_0__["default"].$pres;
 
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
 
 /***/ }),
 

+ 3 - 3
package-lock.json

@@ -15897,9 +15897,9 @@
       }
     },
     "strophe.js": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/strophe.js/-/strophe.js-1.3.0.tgz",
-      "integrity": "sha512-1NSLqtpHevIGb0xQEY33XqaH+/cfrKenLwD5Vwn9QqY/cB21JGDUNg5afhDePXlaFViWHE6M80UkfIzQLbUGKQ=="
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/strophe.js/-/strophe.js-1.3.2.tgz",
+      "integrity": "sha512-N6n93B0+0/qRazWUtgunJNE3DTfEpz363i17Uvnqh0lvl9iATnMtSoZtKjqN3reKPtjtBpbBRMWAQJRc688QkQ=="
     },
     "strophejs-plugin-ping": {
       "version": "0.0.3",

+ 1 - 1
src/headless/package.json

@@ -30,7 +30,7 @@
     "lodash": "^4.17.11",
     "moment": "~> 2.19.3 ",
     "pluggable.js": "2.0.0",
-    "strophe.js": "1.3.0",
+    "strophe.js": "1.3.2",
     "strophejs-plugin-ping": "0.0.3",
     "strophejs-plugin-rsm": "0.0.2",
     "twemoji": "^11.0.1",