fix(externalStorage): Infinitely growing.

In certain scenarios(when the iframe's domain is the same as the parent page)
 the jitsiLocalStorage key from local storage is
included in the serialized local storage and then
propagaded to the parent page. This way we end up with recursion which
grows the localStorage infinitely.
This commit is contained in:
Hristo Terezov 2022-07-18 18:58:02 +03:00
parent cc7d3247ab
commit e9055df9e3
3 changed files with 37 additions and 9 deletions

42
package-lock.json generated
View File

@ -32,7 +32,7 @@
"@giphy/react-components": "5.6.0",
"@giphy/react-native-sdk": "1.7.0",
"@hapi/bourne": "2.0.0",
"@jitsi/js-utils": "2.0.0",
"@jitsi/js-utils": "2.0.3",
"@jitsi/logger": "2.0.0",
"@jitsi/rnnoise-wasm": "0.1.0",
"@jitsi/rtcstats": "9.2.0",
@ -3596,9 +3596,9 @@
}
},
"node_modules/@jitsi/js-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@jitsi/js-utils/-/js-utils-2.0.0.tgz",
"integrity": "sha512-Rk1JFGdXEJ5+eALVRTMohfn3pdMDQqlCJQEkCMLXKlCpEo+JhsOrB4KzlPo1rV9U8PnRfrf0j5N9uf/0C2a8Gw==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@jitsi/js-utils/-/js-utils-2.0.3.tgz",
"integrity": "sha512-yEojQxrbDcx6VngnjVex7y3ypxMxUpZ/DSpP6uhbC53xmw9W/xcNwGspTjZD0cAKAcTjT7e8OQc0ptYyMi8WbA==",
"dependencies": {
"bowser": "2.7.0",
"js-md5": "0.7.3"
@ -12912,6 +12912,20 @@
"webrtc-adapter": "8.0.0"
}
},
"node_modules/lib-jitsi-meet/node_modules/@jitsi/js-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@jitsi/js-utils/-/js-utils-2.0.0.tgz",
"integrity": "sha512-Rk1JFGdXEJ5+eALVRTMohfn3pdMDQqlCJQEkCMLXKlCpEo+JhsOrB4KzlPo1rV9U8PnRfrf0j5N9uf/0C2a8Gw==",
"dependencies": {
"bowser": "2.7.0",
"js-md5": "0.7.3"
}
},
"node_modules/lib-jitsi-meet/node_modules/js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"node_modules/lib-jitsi-meet/node_modules/uuid": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz",
@ -23460,9 +23474,9 @@
"dev": true
},
"@jitsi/js-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@jitsi/js-utils/-/js-utils-2.0.0.tgz",
"integrity": "sha512-Rk1JFGdXEJ5+eALVRTMohfn3pdMDQqlCJQEkCMLXKlCpEo+JhsOrB4KzlPo1rV9U8PnRfrf0j5N9uf/0C2a8Gw==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@jitsi/js-utils/-/js-utils-2.0.3.tgz",
"integrity": "sha512-yEojQxrbDcx6VngnjVex7y3ypxMxUpZ/DSpP6uhbC53xmw9W/xcNwGspTjZD0cAKAcTjT7e8OQc0ptYyMi8WbA==",
"requires": {
"bowser": "2.7.0",
"js-md5": "0.7.3"
@ -30586,6 +30600,20 @@
"webrtc-adapter": "8.0.0"
},
"dependencies": {
"@jitsi/js-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@jitsi/js-utils/-/js-utils-2.0.0.tgz",
"integrity": "sha512-Rk1JFGdXEJ5+eALVRTMohfn3pdMDQqlCJQEkCMLXKlCpEo+JhsOrB4KzlPo1rV9U8PnRfrf0j5N9uf/0C2a8Gw==",
"requires": {
"bowser": "2.7.0",
"js-md5": "0.7.3"
}
},
"js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"uuid": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz",

View File

@ -37,7 +37,7 @@
"@giphy/react-components": "5.6.0",
"@giphy/react-native-sdk": "1.7.0",
"@hapi/bourne": "2.0.0",
"@jitsi/js-utils": "2.0.0",
"@jitsi/js-utils": "2.0.3",
"@jitsi/logger": "2.0.0",
"@jitsi/rnnoise-wasm": "0.1.0",
"@jitsi/rtcstats": "9.2.0",

View File

@ -19,7 +19,7 @@ declare var config: Object;
* @returns {void}
*/
function onFakeLocalStorageChanged() {
APP.API.notifyLocalStorageChanged(jitsiLocalStorage.serialize());
APP.API.notifyLocalStorageChanged(jitsiLocalStorage.serialize([ 'jitsiLocalStorage' ]));
}
/**