Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
is-url-relative-without-domain
Advanced tools
Node.js module. Checks if a URL is relative without domain
Version 2 requires Node.js >= 6.13.
# NPM
$ npm install is-url-relative-without-domain
# Yarn
$ yarn add is-url-relative-without-domain
# NPM
$ npm install is-url-relative-without-domain --no-optional
# Yarn
$ yarn add is-url-relative-without-domain --ignore-optional
var isUrlRelativeWithoutDomain = require('is-url-relative-without-domain');
isUrlRelativeWithoutDomain('/show/must?go=on');
//=> true
isUrlRelativeWithoutDomain('index.php');
//=> true
isUrlRelativeWithoutDomain('https://site.com/index.php');
//=> false
isUrlRelativeWithoutDomain('site.com/show/must?go=on');
//=> false
By default package using optional dependency domains. But, if you want to using your own list of domains, you can install without optional dependencies and specify code like this:
isUrlRelativeWithoutDomain('site.com/foo/bar', ['com', 'рф', '世界']);
In second argument you can add your own array of domains in Unicode.
MIT © 2016-2019 Nikita Bystrov (Arttse)
FAQs
Checks if a URL is relative without domain
The npm package is-url-relative-without-domain receives a total of 105 weekly downloads. As such, is-url-relative-without-domain popularity was classified as not popular.
We found that is-url-relative-without-domain 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.