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

Feature/xss escaping modules #500

Merged
merged 6 commits into from
Feb 26, 2024
Merged

Feature/xss escaping modules #500

merged 6 commits into from
Feb 26, 2024

Conversation

joeyblake
Copy link
Contributor

@joeyblake joeyblake commented Feb 16, 2024

Types of change

  • Bug fix (change which fixes an issue)
  • Enhancement (change which improves upon an existing feature)
  • New feature (change which adds new functionality)

Description

Adds context specific late escaping filters to improve XSS security. This ensures that escaping does not interfere with other logic use cases, in the code it is clear that the string is escaped at output, and any changes further up in the logic will not open up the same vulnerabilities in the future.

https://developers.hubspot.com/docs/cms/hubl/filters#escape-html
https://developers.hubspot.com/docs/cms/hubl/filters#escape-attr
https://developers.hubspot.com/docs/cms/hubl/filters#escape-url
https://developers.hubspot.com/docs/cms/hubl/filters#escape-js
https://developers.hubspot.com/docs/cms/hubl/filters#sanitize-html

Relevant links

Example page:
GitHub issue:

Checklist

People to notify

@joeyblake joeyblake marked this pull request as ready for review February 23, 2024 15:01
Copy link
Member

@jasonnrosa jasonnrosa left a comment

Choose a reason for hiding this comment

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

Looking good to me! Just one comment on one of the variables used for menu depth

@joeyblake joeyblake merged commit eed3840 into main Feb 26, 2024
1 check passed
@joeyblake joeyblake deleted the feature/xss-escaping-modules branch February 26, 2024 14:03
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