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 error message sanitization #912

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from

Conversation

wilmersondasilva
Copy link

Description

After upgrading from 4.6.0 to 4.6.2 the error messages have started to be interpreted as text instead of HTML. To the projects that use auth0_verify_email_page this can break the entire error page. This bug was reported on issue #910.

My solution was to use wp_kses_post instead of just wp_kses to sanitize the error messages. This allows the projects to use any HTML tag already allowed in any WordPress post, so it's a safe way to sanitize the error messages.

References

Issue #910

Testing

You can test it by generating authentication errors and checking if the error message is correctly interpreted as HTML instead of text.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@wilmersondasilva wilmersondasilva requested a review from a team as a code owner August 2, 2024 20:40
@wilmersondasilva wilmersondasilva mentioned this pull request Aug 2, 2024
4 tasks
@martin-mith
Copy link

Hello - can we get someone assigned to review the issue? Thank you.

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