-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: imported fixes 25-01-07 (#34904)
- Loading branch information
1 parent
1cc2bc7
commit c7be829
Showing
42 changed files
with
442 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Security Hotfix (https://docs.rocket.chat/docs/security-fixes-and-updates) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import './oauth/oauth2-server'; | ||
import './oauth/default-services'; | ||
import './admin/functions/addOAuthApp'; | ||
import './admin/methods/updateOAuthApp'; | ||
import './admin/methods/deleteOAuthApp'; |
21 changes: 0 additions & 21 deletions
21
apps/meteor/app/oauth2-server-config/server/oauth/default-services.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import DOMPurify from 'dompurify'; | ||
import type { ReactElement } from 'react'; | ||
|
||
/** @deprecated */ | ||
const RawText = ({ children }: { children: string }): ReactElement => <span dangerouslySetInnerHTML={{ __html: children }} />; | ||
const RawText = ({ children }: { children: string }): ReactElement => ( | ||
<span dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(children) }} /> | ||
); | ||
|
||
export default RawText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
export const createToken = (): string => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); | ||
export const createToken = (): string => { | ||
const array = new Uint8Array(16); | ||
if (typeof window !== 'undefined' && window.crypto && window.crypto.getRandomValues) { | ||
window.crypto.getRandomValues(array); | ||
} else { | ||
// Use Node.js crypto | ||
const { randomBytes } = require('crypto'); // eslint-disable-line @typescript-eslint/no-var-requires | ||
const buffer = randomBytes(16); | ||
array.set(buffer); | ||
} | ||
return Array.from(array) | ||
.map((byte) => byte.toString(16).padStart(2, '0')) | ||
.join(''); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
import { Box } from '@rocket.chat/fuselage'; | ||
import DOMPurify from 'dompurify'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
const NewBot = () => { | ||
const { t } = useTranslation(); | ||
|
||
return <Box pb={20} fontScale='h4' key='bots' dangerouslySetInnerHTML={{ __html: t('additional_integrations_Bots') }} />; | ||
return ( | ||
<Box | ||
pb={20} | ||
fontScale='h4' | ||
key='bots' | ||
dangerouslySetInnerHTML={{ | ||
__html: DOMPurify.sanitize(t('additional_integrations_Bots'), { | ||
ALLOWED_TAGS: ['a'], | ||
ALLOWED_ATTR: ['href', 'target'], | ||
}), | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default NewBot; |
Oops, something went wrong.