Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
uri-template-lite
Advanced tools
URI Template RFC 6570 expansion and extraction in 1.5KB that passes URI Template Tests.
// Call `expand` directly
var data = {"domain":"example.com", "user":"fred", "query":"mycelium"}
URI.expand("http://{domain}/~{user}/foo{?query,number}", data)
// Returns http://example.com/~fred/foo?query=mycelium
// ..or use `Template` constructor
var data = {"domain":"example.com", "user":"fred", "query":"mycelium", "number": 3}
var template = new URI.Template("http://{domain}/~{user}/foo{?query,number}")
template.expand(data)
// Returns http://example.com/~fred/foo?query=mycelium&number=3
// Extract variables
template.match("http://example.com/~fred/foo?query=mycelium&number=3")
// Returns {"domain":"example.com", "user":"fred", "query":"mycelium", "number": "3"}
template.match("http://other.com/?query=mycelium")
// Returns false
To use it in the browser, include uri-template-min.js in your site
<script src=uri-template-min.js></script>
In node.js: npm install uri-template-lite
var URI = require("uri-template-lite").URI
This implementation tries to do a best effort template expansion and leaves erroneous expressions in the returned URI instead of throwing errors. So for example, the incorrect expression {unclosed will return {unclosed as output.
It should work IE6 and up but automated testing is currently broken.
browser-upgrade-lite
package
or other ES5 polyfill.escape
should be patched to remove non-standard 2nd param,
browser-upgrade-lite
does that.Copyright (c) 2014-2019 Lauri Rooden <lauri@rooden.ee>
The MIT License
FAQs
URI Template [RFC 6570] expansion and extraction
The npm package uri-template-lite receives a total of 0 weekly downloads. As such, uri-template-lite popularity was classified as not popular.
We found that uri-template-lite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.