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.
chromium-net-errors-urlbox
Advanced tools
Readme
Provides Chromium network errors found in net_error_list.h as custom errors for Node.js.
They correspond to the error codes that could be provided by
Electron's did-fail-load
event, for
example.
npm install chromium-net-errors --save
var app = require('app');
var BrowserWindow = require('browser-window');
var networkErrors = require('chromium-net-errors');
app.on('ready', function () {
var win = new BrowserWindow({ width: 800, height: 600 });
win.webContents.on('did-fail-load', function (e, errorCode) {
throw networkErrors.createByCode(errorCode);
});
win.loadUrl('http://blablanotexist.com');
});
Will pop-up the following error:
Uncaught Exception:
NameNotResolvedError: The host name could not be resolved.
at Object.exports.createByCode (/tmp/ele/node_modules/chromium-net-errors/index.js:72:9)
at EventEmitter.<anonymous> (/tmp/ele/app.js:10:25)
at emitThree (events.js:97:13)
at EventEmitter.emit (events.js:172:7)
var cne = require('chromium-net-errors');
var err = new cne.ConnectionTimedOutError();
console.log(err instanceof Error); // true
console.log(err instanceof cne.ChromiumNetError); // true
console.log(err instanceof cne.ConnectionTimedOutError); // true
var err = cne.createByCode(-201);
console.log(err instanceof cne.CertDateInvalidError);
// true
console.log(err.isCertificateError());
// true
console.log(err.type);
// certificate
console.log(err.message);
// The server responded with a certificate that is signed by an authority
// we don't trust. The could mean:
//
// 1. An attacker has substituted the real certificate for a cert that
// contains his public key and is signed by his cousin.
//
// 2. The server operator has a legitimate certificate from a CA we don't
// know about, but should trust.
//
// 3. The server is presenting a self-signed certificate, providing no
// defense against active attackers (but foiling passive attackers).
MIT
FAQs
Chromium network errors for Chromium-based JavaScript environments
The npm package chromium-net-errors-urlbox receives a total of 3 weekly downloads. As such, chromium-net-errors-urlbox popularity was classified as not popular.
We found that chromium-net-errors-urlbox 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.
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.