Skip to content
Commits on Source (2)
variables:
DOCKER_HUB_REPO: libresh/rocketchat
VERSION: 6.4.5
VERSION: 6.4.8
test:
stage: test
......
FROM node:14.21.3-buster AS build
FROM node:14.21.3-bullseye AS build
RUN set -eux \
&& apt-get update \
......@@ -21,13 +21,10 @@ RUN git apply no-upgrade.patch
COPY test-scalability.patch test-scalability.patch
RUN git apply test-scalability.patch
COPY fix-oauth-login.patch fix-oauth-login.patch
RUN git apply fix-oauth-login.patch
RUN GENERATE_SOURCEMAP=false TOOL_NODE_FLAGS="--max_old_space_size=8192" yarn build:ci -- --directory /build
FROM node:14.21.3-buster-slim as patched
FROM node:14.21.3-bullseye-slim as patched
RUN groupadd -r rocketchat \
&& useradd -r -g rocketchat rocketchat \
......
diff --git a/apps/meteor/app/custom-oauth/client/custom_oauth_client.js b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
index a112777584..c516f115ae 100644
--- a/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
+++ b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
@@ -6,7 +6,6 @@ import { Meteor } from 'meteor/meteor';
import { OAuth } from 'meteor/oauth';
import { ServiceConfiguration } from 'meteor/service-configuration';
-import './swapSessionStorage';
import { isURL } from '../../../lib/utils/isURL';
// Request custom OAuth credentials for the user
diff --git a/apps/meteor/app/custom-oauth/client/swapSessionStorage.js b/apps/meteor/app/custom-oauth/client/swapSessionStorage.js
deleted file mode 100644
index 83d9331097..0000000000
--- a/apps/meteor/app/custom-oauth/client/swapSessionStorage.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import { Meteor } from 'meteor/meteor';
-import { OAuth } from 'meteor/oauth';
-import { Reload } from 'meteor/reload';
-
-// TODO: This is a nasty workaround and should be removed as soon as possible
-// Firefox is losing the sessionStorage data (v >= 79.0) after the redirect
-
-if (navigator.userAgent.indexOf('Firefox') !== -1) {
- const KEY_NAME = 'Swapped_Storage_Workaround';
-
- OAuth.saveDataForRedirect = (loginService, credentialToken) => {
- Meteor._localStorage.setItem(KEY_NAME, JSON.stringify({ loginService, credentialToken }));
- Reload._migrate(null, { immediateMigration: true });
- };
-
- OAuth.getDataAfterRedirect = () => {
- let migrationData = Meteor._localStorage.getItem(KEY_NAME);
- Meteor._localStorage.removeItem(KEY_NAME);
- try {
- migrationData = JSON.parse(migrationData);
- } catch (error) {
- migrationData = null;
- }
-
- if (!(migrationData && migrationData.credentialToken)) {
- return null;
- }
-
- const { credentialToken } = migrationData;
- const key = OAuth._storageTokenPrefix + credentialToken;
- let credentialSecret;
- try {
- credentialSecret = sessionStorage.getItem(key);
- sessionStorage.removeItem(key);
- } catch (e) {
- Meteor._debug('error retrieving credentialSecret', e);
- }
- return {
- loginService: migrationData.loginService,
- credentialToken,
- credentialSecret,
- };
- };
-}