From 1e6263d1af1de9059071456d743d126a8aebc0e9 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Wed, 8 Sep 2021 23:00:36 +0530 Subject: Expose 'known certificate hosts' in ms teams and outlook to try to fix certificate expiry issue (#675) --- recipes/msteams/index.js | 26 ++++++++++++++++++++++++++ recipes/msteams/package.json | 2 +- recipes/msteams/webview.js | 5 +++++ 3 files changed, 32 insertions(+), 1 deletion(-) (limited to 'recipes/msteams') diff --git a/recipes/msteams/index.js b/recipes/msteams/index.js index d1bd721..e04254f 100644 --- a/recipes/msteams/index.js +++ b/recipes/msteams/index.js @@ -2,4 +2,30 @@ module.exports = Ferdi => class MicrosoftTeams extends Ferdi { overrideUserAgent() { return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); } + + // https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/teams-sign-in/sign-in-loop#resolution + // https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#skype-for-business-online-and-microsoft-teams + knownCertificateHosts() { + return [ + 'aka.ms', + 'aspnetcdn.com', + 'azure.net', + 'azureedge.net', + 'live.com', + 'microsoft.com', + 'microsoftonline.com', + 'msecnd.net', + 'msedge.net', + 'mstea.ms', + 'office.net', + 'okta.com', + 'sfbassets.com', + 'skype.com', + 'skypeassets.com', + 'skypeforbusiness.com', + 'tenor.com', + 'windows.com', + 'windows.net', + ]; + }; }; diff --git a/recipes/msteams/package.json b/recipes/msteams/package.json index c79276f..2350372 100644 --- a/recipes/msteams/package.json +++ b/recipes/msteams/package.json @@ -1,7 +1,7 @@ { "id": "msteams", "name": "Microsoft Teams", - "version": "3.1.1", + "version": "3.1.2", "license": "MIT", "aliases": [ "teamsChat" diff --git a/recipes/msteams/webview.js b/recipes/msteams/webview.js index bf25562..786cd9b 100644 --- a/recipes/msteams/webview.js +++ b/recipes/msteams/webview.js @@ -2,6 +2,11 @@ const _path = _interopRequireDefault(require('path')); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +window.addEventListener('beforeunload', async () => { + Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); + Ferdi.releaseServiceWorkers(); +}); + module.exports = Ferdi => { const getMessages = () => { let messages = 0; -- cgit v1.2.3-54-g00ecf