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: fix user email incorrect format #4483

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stanislavefremov
Copy link

sendMailToUser function gets email body in $post_body variable and unconditionally applies htmlspecialchars to it, which escapes html tags. It maybe unneeded as later sendMailToUser passes email body to $emailService->sendMail method which performs XSS check through sanitizeEmailBody method and applies htmlspecialchars if needed.

sendMailToUser function gets email body in $post_body variable and unconditionally applies htmlspecialchars to it, which escapes html tags. It maybe unneeded as later sendMailToUser passes email body to $emailService->sendMail method which performs XSS check through sanitizeEmailBody method and applies htmlspecialchars if needed.
@stanislavefremov
Copy link
Author

stanislavefremov commented Nov 22, 2024

htmlspecialchars in sendMailToUser function seems to be unnecessary. PR suggested as a solution for ##4482 issue

Copy link
Contributor

@corentin-soriano corentin-soriano left a comment

Choose a reason for hiding this comment

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

It seems to me that this function is used by mail_me (direct user input). I think wee can add $antiXSS->clean() to clear eventual XSS payload without break the html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants