Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
secure-handlebars-helpers
Advanced tools
Readme
This handy client-side script registers the required XSS output filtering functions as handlebars' helpers, and is designed ONLY for templates that already have the context-sensitive filter markup (e.g., <title>{{{yd title}}}</title>
) automatically inserted using secure-handlebars.
Download the latest version at dist/secure-handlebars-helpers.min.js, and embed it after the handlebars script file.
<script type="text/javascript" src="dist/handlebars.js"></script>
<script type="text/javascript" src="dist/secure-handlebars-helpers.min.js"></script>
<script type="text/javascript">
var compiledTemplate = Handlebars.compile("<title>{{{yd title}}}</title>");
// html is assigned <title><script>alert('xss')</script></title>
var html = compiledTemplate({
title: "<script>alert('xss')</script>"
});
</script>
Note: Read more about the underlying output filtering principle at xss-filters.
To contribute, you will make changes in src/
and tests/
, followed by the following commands:
$ npm run-script build
to build the standalone JavaScript for client-side use$ npm test
to run the testsThis software is free to use under the Yahoo BSD license. See the LICENSE file for license text and copyright information.
FAQs
Client-side XSS filters for templates processed by context-parser-handlebars
The npm package secure-handlebars-helpers receives a total of 70 weekly downloads. As such, secure-handlebars-helpers popularity was classified as not popular.
We found that secure-handlebars-helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.