Skip to content

Commit

Permalink
fix(chat): disallow TAB and ASCII control symbols (Issue #1212) (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaBondar authored Apr 8, 2024
1 parent 3bd2cb9 commit 9dcafb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/chat/src/utils/app/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const getFilesWithInvalidFileType = (
? []
: files.filter((file) => !isAllowedMimeType(allowedFileTypes, file.type));
};
export const notAllowedSymbols = ':;,=/{}%&\\';
export const notAllowedSymbols = ':;,=/{}%&\\\t\x00-\x1F';
export const notAllowedSymbolsRegex = new RegExp(
`[${escapeRegExp(notAllowedSymbols)}]|(\r\n|\n|\r|\t)`,
'gm',
Expand Down

0 comments on commit 9dcafb1

Please sign in to comment.