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

urllib

Package Overview
Dependencies
Maintainers
13
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urllib - npm Package Compare versions

Comparing version 3.26.0 to 3.27.0

dist/package.json

2

dist/commonjs/HttpAgent.d.ts
import { LookupFunction } from 'node:net';
import { Agent, Dispatcher, buildConnector } from 'undici';
export type CheckAddressFunction = (ip: string, family: number | string) => boolean;
export type CheckAddressFunction = (ip: string, family: number | string, hostname: string) => boolean;
export type HttpAgentOptions = {

@@ -5,0 +5,0 @@ lookup?: LookupFunction;

@@ -39,3 +39,3 @@ "use strict";

if (typeof address === 'string') {
if (!options.checkAddress(address, family)) {
if (!options.checkAddress(address, family, hostname)) {
err = new IllegalAddressError(hostname, address, family);

@@ -47,3 +47,3 @@ }

for (const addr of addresses) {
if (!options.checkAddress(addr.address, addr.family)) {
if (!options.checkAddress(addr.address, addr.family, hostname)) {
err = new IllegalAddressError(hostname, addr.address, addr.family);

@@ -74,3 +74,3 @@ break;

// if request hostname is ip, custom lookup won't execute
if (!this.#checkAddress(hostname, family)) {
if (!this.#checkAddress(hostname, family, hostname)) {
throw new IllegalAddressError(hostname, hostname, family);

@@ -77,0 +77,0 @@ }

@@ -71,3 +71,3 @@ "use strict";

}
exports.HEADER_USER_AGENT = (0, default_user_agent_1.default)('node-urllib', '3.26.0');
exports.HEADER_USER_AGENT = (0, default_user_agent_1.default)('node-urllib', '3.27.0');
function getFileName(stream) {

@@ -74,0 +74,0 @@ const filePath = stream.path;

import { LookupFunction } from 'node:net';
import { Agent, Dispatcher, buildConnector } from 'undici';
export type CheckAddressFunction = (ip: string, family: number | string) => boolean;
export type CheckAddressFunction = (ip: string, family: number | string, hostname: string) => boolean;
export type HttpAgentOptions = {

@@ -5,0 +5,0 @@ lookup?: LookupFunction;

@@ -33,3 +33,3 @@ import dns from 'node:dns';

if (typeof address === 'string') {
if (!options.checkAddress(address, family)) {
if (!options.checkAddress(address, family, hostname)) {
err = new IllegalAddressError(hostname, address, family);

@@ -41,3 +41,3 @@ }

for (const addr of addresses) {
if (!options.checkAddress(addr.address, addr.family)) {
if (!options.checkAddress(addr.address, addr.family, hostname)) {
err = new IllegalAddressError(hostname, addr.address, addr.family);

@@ -68,3 +68,3 @@ break;

// if request hostname is ip, custom lookup won't execute
if (!this.#checkAddress(hostname, family)) {
if (!this.#checkAddress(hostname, family, hostname)) {
throw new IllegalAddressError(hostname, hostname, family);

@@ -71,0 +71,0 @@ }

@@ -65,3 +65,3 @@ import diagnosticsChannel from 'node:diagnostics_channel';

}
export const HEADER_USER_AGENT = createUserAgent('node-urllib', '3.26.0');
export const HEADER_USER_AGENT = createUserAgent('node-urllib', '3.27.0');
function getFileName(stream) {

@@ -68,0 +68,0 @@ const filePath = stream.path;

{
"name": "urllib",
"version": "3.26.0",
"version": "3.27.0",
"publishConfig": {

@@ -119,3 +119,4 @@ "access": "public"

"types": "./dist/commonjs/index.d.ts",
"main": "./dist/commonjs/index.js"
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js"
}

@@ -9,3 +9,3 @@ import dns from 'node:dns';

export type CheckAddressFunction = (ip: string, family: number | string) => boolean;
export type CheckAddressFunction = (ip: string, family: number | string, hostname: string) => boolean;

@@ -50,3 +50,3 @@ export type HttpAgentOptions = {

if (typeof address === 'string') {
if (!options.checkAddress(address, family)) {
if (!options.checkAddress(address, family, hostname)) {
err = new IllegalAddressError(hostname, address, family);

@@ -57,3 +57,3 @@ }

for (const addr of addresses) {
if (!options.checkAddress(addr.address, addr.family)) {
if (!options.checkAddress(addr.address, addr.family, hostname)) {
err = new IllegalAddressError(hostname, addr.address, addr.family);

@@ -85,3 +85,3 @@ break;

// if request hostname is ip, custom lookup won't execute
if (!this.#checkAddress(hostname, family)) {
if (!this.#checkAddress(hostname, family, hostname)) {
throw new IllegalAddressError(hostname, hostname, family);

@@ -88,0 +88,0 @@ }

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