Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix invitation message is converted to uni message #52684

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix invitation messageis converted to uni message
  • Loading branch information
NJ-2020 committed Nov 17, 2024
commit d7159314bd7b9f197ebbb77eccab07560beef31c
4 changes: 3 additions & 1 deletion src/libs/actions/Policy/Member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,9 @@ function addMembersToWorkspace(invitedEmailsToAccountIDs: InvitedEmailsToAccount
employees: JSON.stringify(logins.map((login) => ({email: login}))),
...(optimisticAnnounceChat.announceChatReportID ? {announceChatReportID: optimisticAnnounceChat.announceChatReportID} : {}),
...(optimisticAnnounceChat.announceChatReportActionID ? {announceCreatedReportActionID: optimisticAnnounceChat.announceChatReportActionID} : {}),
welcomeNote: Parser.replace(welcomeNote),
welcomeNote: Parser.replace(welcomeNote, {
shouldEscapeText: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... the welcomeNote is provided by form input, right? Are there not security implications of leaving the text unescaped?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @yuwenmemon . Sorry I don't understand what would be the security implication in this case?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm, tested - it only comes via email/text and we prevent html tags anyway

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay! Wanted to be able to get a closer look at this one and time passed me by.

}),
policyID,
};
if (!isEmptyObject(membersChats.reportCreationData)) {
Expand Down
Loading