Skip to content

Commit

Permalink
Merge pull request #24459 from RocketChat/release-4.4.2
Browse files Browse the repository at this point in the history
Release 4.4.2
  • Loading branch information
pierre-lehnen-rc authored Feb 9, 2022
2 parents 55598c2 + c60b198 commit ec8011e
Show file tree
Hide file tree
Showing 24 changed files with 214 additions and 274 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/ubi8/nodejs-12

ENV RC_VERSION 4.4.1
ENV RC_VERSION 4.4.2

MAINTAINER buildmaster@rocket.chat

Expand Down
43 changes: 43 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -70005,6 +70005,17 @@
"5.0"
],
"pull_requests": [
{
"pr": "24432",
"title": "Release 4.4.1",
"userLogin": "pierre-lehnen-rc",
"contributors": [
"sampaiodiego",
"pierre-lehnen-rc",
"dougfabris",
"ostjen"
]
},
{
"pr": "24387",
"title": "[FIX] Slash commands previews not working",
Expand Down Expand Up @@ -70065,6 +70076,38 @@
]
}
]
},
"4.4.2": {
"node_version": "14.18.2",
"npm_version": "6.14.15",
"apps_engine_version": "1.30.0",
"mongo_versions": [
"3.6",
"4.0",
"4.2",
"4.4",
"5.0"
],
"pull_requests": [
{
"pr": "24450",
"title": "[FIX] OAuth mismatch redirect_uri error",
"userLogin": "sampaiodiego",
"milestone": "4.4.2",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "24453",
"title": "Chore: bump fuselage version",
"userLogin": "dougfabris",
"milestone": "4.4.2",
"contributors": [
"dougfabris"
]
}
]
}
}
}
2 changes: 1 addition & 1 deletion .snapcraft/resources/prepareRocketChat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl -SLf "https://releases.rocket.chat/4.4.1/download/" -o rocket.chat.tgz
curl -SLf "https://releases.rocket.chat/4.4.2/download/" -o rocket.chat.tgz

tar xf rocket.chat.tgz --strip 1

Expand Down
2 changes: 1 addition & 1 deletion .snapcraft/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 5. `snapcraft snap`

name: rocketchat-server
version: 4.4.1
version: 4.4.2
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
38 changes: 37 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@

# 4.4.2
`2022-02-09 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻`

### Engine versions
- Node: `14.18.2`
- NPM: `6.14.15`
- MongoDB: `3.6, 4.0, 4.2, 4.4, 5.0`
- Apps-Engine: `1.30.0`

### 🐛 Bug fixes


- OAuth mismatch redirect_uri error ([#24450](https://github.com/RocketChat/Rocket.Chat/pull/24450))

<details>
<summary>🔍 Minor changes</summary>


- Chore: bump fuselage version ([#24453](https://github.com/RocketChat/Rocket.Chat/pull/24453))

</details>

### 👩‍💻👨‍💻 Core Team 🤓

- [@dougfabris](https://github.com/dougfabris)
- [@sampaiodiego](https://github.com/sampaiodiego)

# 4.4.1
`2022-02-07 · 6 🐛 · 5 👩‍💻👨‍💻`
`2022-02-07 · 6 🐛 · 1 🔍 · 6 👩‍💻👨‍💻`

### Engine versions
- Node: `14.18.2`
Expand All @@ -25,11 +52,20 @@

Fix `bio` and `prid` startup index creation errors.

<details>
<summary>🔍 Minor changes</summary>


- Release 4.4.1 ([#24432](https://github.com/RocketChat/Rocket.Chat/pull/24432))

</details>

### 👩‍💻👨‍💻 Core Team 🤓

- [@dougfabris](https://github.com/dougfabris)
- [@gabriellsh](https://github.com/gabriellsh)
- [@ostjen](https://github.com/ostjen)
- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc)
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@tassoevan](https://github.com/tassoevan)

Expand Down
2 changes: 1 addition & 1 deletion app/utils/rocketchat.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "4.4.1"
"version": "4.4.2"
}
2 changes: 1 addition & 1 deletion client/components/Omnichannel/modals/TranscriptModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const TranscriptModal: FC<TranscriptModalProps> = ({
}) => {
const t = useTranslation();

const inputRef = useAutoFocus(true);
const inputRef = useAutoFocus<HTMLInputElement>(true);

const { values, handlers } = useForm({
email: emailDefault || '',
Expand Down
2 changes: 1 addition & 1 deletion client/components/TwoFactorModal/TwoFactorEmailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const TwoFactorEmailModal = ({ onConfirm, onClose, emailOrUsername }: TwoFactorE
const dispatchToastMessage = useToastMessageDispatch();
const t = useTranslation();
const [code, setCode] = useState<string>('');
const ref = useAutoFocus();
const ref = useAutoFocus<HTMLInputElement>();

const sendEmailCode = useEndpoint('POST', 'users.2fa.sendEmailCode');

Expand Down
2 changes: 1 addition & 1 deletion client/components/TwoFactorModal/TwoFactorTotpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type TwoFactorTotpModalProps = {
const TwoFactorTotpModal = ({ onConfirm, onClose }: TwoFactorTotpModalProps): ReactElement => {
const t = useTranslation();
const [code, setCode] = useState<string>('');
const ref = useAutoFocus();
const ref = useAutoFocus<HTMLInputElement>();

const onConfirmTotpCode = (): void => {
onConfirm(code, Method.TOTP);
Expand Down
6 changes: 3 additions & 3 deletions client/components/VerticalBar/VerticalBarAction.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ActionButton } from '@rocket.chat/fuselage';
import React, { ReactElement, memo, MouseEventHandler } from 'react';
import { ActionButton, Icon } from '@rocket.chat/fuselage';
import React, { ReactElement, memo, MouseEventHandler, ComponentProps } from 'react';

const VerticalBarAction = ({
name,
...props
}: {
name: string;
name: ComponentProps<typeof Icon>['name'];
title?: string;
onClick?: MouseEventHandler<HTMLOrSVGElement>;
}): ReactElement => <ActionButton flexShrink={0} icon={name} ghost {...props} tiny />;
Expand Down
2 changes: 1 addition & 1 deletion client/components/avatar/BaseAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Avatar, AvatarProps, Skeleton } from '@rocket.chat/fuselage';
import React, { FC, useState } from 'react';

export type BaseAvatarProps = AvatarProps;
export type BaseAvatarProps = Omit<AvatarProps, 'is'>;

const BaseAvatar: FC<BaseAvatarProps> = ({ size, ...props }) => {
const [error, setError] = useState<unknown>(false);
Expand Down
2 changes: 1 addition & 1 deletion client/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../ee/client/ecdh';
import './polyfills';

import './lib/oauthRedirectUri';
import '../lib/oauthRedirectUri';
import './lib/meteorCallWrapper';
import './importPackages';

Expand Down
2 changes: 1 addition & 1 deletion client/views/admin/cloud/CopyStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CopyStep: FC<CopyStepProps> = ({ onNextButtonClick }) => {
loadWorkspaceRegisterData();
}, [getWorkspaceRegisterData]);

const copyRef = useRef<Element>();
const copyRef = useRef<HTMLElement>(null);

useEffect(() => {
if (!copyRef.current) {
Expand Down
4 changes: 2 additions & 2 deletions client/views/room/Header/ToolBox/ToolBox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Menu, Option, MenuProps, Box } from '@rocket.chat/fuselage';
import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import React, { memo, ReactNode, useRef, ComponentProps, FC } from 'react';
import React, { memo, ReactNode, useRef, ComponentProps, FC, ReactElement } from 'react';
// import tinykeys from 'tinykeys';

// used to open the menu option by keyboard
Expand Down Expand Up @@ -100,7 +100,7 @@ const ToolBox: FC<ToolBoxProps> = ({ className }) => {
aria-keyshortcuts='alt'
tabIndex={-1}
options={hiddenActions}
renderItem={({ value, ...props }): ReactNode => value && hiddenActionRenderers.current[value](props)}
renderItem={({ value, ...props }): ReactElement | null => value && hiddenActionRenderers.current[value](props)}
/>
)}
</>
Expand Down
2 changes: 1 addition & 1 deletion client/views/room/contextualBar/Threads/ThreadList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ThreadList: FC<ThreadListProps> = function ThreadList({
const showRealNames = Boolean(useSetting('UI_Use_Real_Name'));

const t = useTranslation();
const inputRef = useAutoFocus(true);
const inputRef = useAutoFocus<HTMLInputElement>(true);
const [name] = useCurrentRoute();

if (!name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const FileUploadModal = ({ onClose, file, fileName, onSubmit, invalidContentType
const t = useTranslation();
const dispatchToastMessage = useToastMessageDispatch();

const ref = useAutoFocus();
const ref = useAutoFocus<HTMLInputElement>();

const handleName = (e: ChangeEvent<HTMLInputElement>): void => {
setName(e.currentTarget.value);
Expand Down
4 changes: 2 additions & 2 deletions client/views/teams/CreateTeamModal/CreateTeamModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Modal, ButtonGroup, Button, TextInput, Field, ToggleSwitch, FieldGroup } from '@rocket.chat/fuselage';
import { useMutableCallback, useDebouncedCallback, useAutoFocus } from '@rocket.chat/fuselage-hooks';
import React, { FC, memo, Ref, useCallback, useEffect, useMemo, useState } from 'react';
import React, { FC, memo, useCallback, useEffect, useMemo, useState } from 'react';

import { IUser } from '../../../../definition/IUser';
import { usePermission } from '../../../contexts/AuthorizationContext';
Expand Down Expand Up @@ -230,7 +230,7 @@ const CreateTeamModal: FC<CreateTeamModalProps> = ({ onClose }) => {

const t = useTranslation();

const focusRef = useAutoFocus() as Ref<HTMLElement>;
const focusRef = useAutoFocus<HTMLInputElement>();

return (
<Modal>
Expand Down
2 changes: 1 addition & 1 deletion client/views/teams/CreateTeamModal/TeamNameInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type TeamNameInputProps = TextInputProps & {
private: boolean;
};

const TeamNameInput = forwardRef<HTMLElement, TeamNameInputProps>(function TeamNameInput({ private: _private = true, ...props }, ref) {
const TeamNameInput = forwardRef<HTMLInputElement, TeamNameInputProps>(function TeamNameInput({ private: _private = true, ...props }, ref) {
const addon = useMemo(() => <Icon name={_private ? 'team-lock' : 'team'} size='x20' />, [_private]);

return <TextInput ref={ref} {...props} addon={addon} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type TextButtonProps = {
action: () => void;
};

const TextButton = forwardRef<Element, TextButtonProps>(function TextButton({ text, action }, ref) {
const TextButton = forwardRef<HTMLElement, TextButtonProps>(function TextButton({ text, action }, ref) {
const t = useTranslation();

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const CannedResponseList: FC<{
reload,
}) => {
const t = useTranslation();
const inputRef = useAutoFocus(true);
const inputRef = useAutoFocus<HTMLInputElement>(true);

const cannedId = useTabContext();

Expand Down
17 changes: 17 additions & 0 deletions client/lib/oauthRedirectUri.ts → lib/oauthRedirectUri.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { Meteor } from 'meteor/meteor';
import { OAuth } from 'meteor/oauth';

const { _redirectUri } = OAuth;

const warn = ((): ((message: unknown) => void) => {
if (Meteor.isServer) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { SystemLogger } = require('../server/lib/logger/system');
return (message: unknown): void => {
SystemLogger.warn(message);
};
}

return console.warn;
})();

OAuth._redirectUri = (serviceName: string, config: any, params: unknown, absoluteUrlOptions: unknown): string => {
const ret = _redirectUri(serviceName, config, params, absoluteUrlOptions);

// DEPRECATED: Remove in v5.0.0
// Meteor 2.3 removed ?close from redirect uri so we need to add it back to not break old oauth clients
// https://github.com/meteor/meteor/commit/b5b7306bedc3e8eb241e64efb1e281925aa75dd3#diff-59244f4e0176cb1beed2e287924e97dc7ae2c0cc51494ce121a85d8937d116a5L11
if (!config?.loginStyle && !ret.includes('close')) {
warn(
`Automatically added ?close to 'redirect_uri' for ${serviceName}, this behavior will be removed in v5.0.0.\n` +
"Please update your OAuth config to accept both with and without ?close as the 'redirect_uri'.",
);
return `${ret + (ret.includes('?') ? '&' : '?')}close`;
}

Expand Down
Loading

0 comments on commit ec8011e

Please sign in to comment.