mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: XSS vulnerability in Ragflow's chat view (#10519)
### What problem does this PR solve? Fix: XSS vulnerability in Ragflow's chat view ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -54,8 +54,8 @@ function MarkdownContent({
|
|||||||
const { setDocumentIds, data: fileThumbnails } =
|
const { setDocumentIds, data: fileThumbnails } =
|
||||||
useFetchDocumentThumbnailsByIds();
|
useFetchDocumentThumbnailsByIds();
|
||||||
const contentWithCursor = useMemo(() => {
|
const contentWithCursor = useMemo(() => {
|
||||||
// let text = DOMPurify.sanitize(content);
|
let text = DOMPurify.sanitize(content);
|
||||||
let text = content;
|
// let text = content;
|
||||||
if (text === '') {
|
if (text === '') {
|
||||||
text = t('chat.searching');
|
text = t('chat.searching');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,8 +48,8 @@ const MarkdownContent = ({
|
|||||||
const { setDocumentIds, data: fileThumbnails } =
|
const { setDocumentIds, data: fileThumbnails } =
|
||||||
useFetchDocumentThumbnailsByIds();
|
useFetchDocumentThumbnailsByIds();
|
||||||
const contentWithCursor = useMemo(() => {
|
const contentWithCursor = useMemo(() => {
|
||||||
// let text = DOMPurify.sanitize(content);
|
let text = DOMPurify.sanitize(content);
|
||||||
let text = content;
|
// let text = content;
|
||||||
if (text === '') {
|
if (text === '') {
|
||||||
text = t('chat.searching');
|
text = t('chat.searching');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,8 +64,8 @@ const MarkdownContent = ({
|
|||||||
const { setDocumentIds, data: fileThumbnails } =
|
const { setDocumentIds, data: fileThumbnails } =
|
||||||
useFetchDocumentThumbnailsByIds();
|
useFetchDocumentThumbnailsByIds();
|
||||||
const contentWithCursor = useMemo(() => {
|
const contentWithCursor = useMemo(() => {
|
||||||
// let text = DOMPurify.sanitize(content);
|
let text = DOMPurify.sanitize(content);
|
||||||
let text = content;
|
// let text = content;
|
||||||
if (text === '') {
|
if (text === '') {
|
||||||
text = t('chat.searching');
|
text = t('chat.searching');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user