Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@locker/trusted-types

Package Overview
Dependencies
Maintainers
8
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/trusted-types - npm Package Compare versions

Comparing version 0.19.7 to 0.19.8

36

dist/index.cjs.js

@@ -32,5 +32,39 @@ /*!

};
// Temporarily surround in try-catch until migration to AMD run.
try {
createPolicy('default', {
createHTML(dirty) {
// Treat null & undefined separately
if (dirty === 'null' || dirty === 'undefined') {
return dirty;
}
return dirty;
},
// Ignore typescript type validation for this policy.
// Returning `undefined` from a TT policy blocks usages
// of specific DOM sinks affected by this hook.
// We want to block eval and inline scripts.
// @ts-ignore
createScript(dirty) {
// Treat null & undefined separately
if (dirty === 'null' || dirty === 'undefined') {
return dirty;
}
// Block script evaluation
return undefined;
},
createScriptURL(dirty) {
// Treat null & undefined separately
if (dirty === 'null' || dirty === 'undefined') {
return dirty;
}
return dirty;
}
});
} catch (_unused) {
// swallow
}
const trusted = createPolicy('trusted', policyOptions);
exports.createPolicy = createPolicy;
exports.trusted = trusted;
/*! version: 0.19.7 */
/*! version: 0.19.8 */

@@ -26,4 +26,38 @@ /*!

};
// Temporarily surround in try-catch until migration to AMD run.
try {
createPolicy('default', {
createHTML(dirty) {
// Treat null & undefined separately
if (dirty === 'null' || dirty === 'undefined') {
return dirty;
}
return dirty;
},
// Ignore typescript type validation for this policy.
// Returning `undefined` from a TT policy blocks usages
// of specific DOM sinks affected by this hook.
// We want to block eval and inline scripts.
// @ts-ignore
createScript(dirty) {
// Treat null & undefined separately
if (dirty === 'null' || dirty === 'undefined') {
return dirty;
}
// Block script evaluation
return undefined;
},
createScriptURL(dirty) {
// Treat null & undefined separately
if (dirty === 'null' || dirty === 'undefined') {
return dirty;
}
return dirty;
}
});
} catch (_unused) {
// swallow
}
const trusted = createPolicy('trusted', policyOptions);
export { createPolicy, trusted };
/*! version: 0.19.7 */
/*! version: 0.19.8 */

2

package.json
{
"name": "@locker/trusted-types",
"version": "0.19.7",
"version": "0.19.8",
"license": "SEE LICENSE IN LICENSE.txt",

@@ -5,0 +5,0 @@ "author": "Salesforce UI Security Team",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc