Socket
Socket
Sign inDemoInstall

whatwg-url

Package Overview
Dependencies
2
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.0 to 4.3.0

.vscode/launch.json

36

lib/url-state-machine.js

@@ -277,6 +277,15 @@ "use strict";

} else if (input[pointer] !== undefined) {
let dotsSeen = 0;
let numbersSeen = 0;
while (input[pointer] !== undefined) {
let value = null;
if (numbersSeen > 0) {
if (input[pointer] === 46 && numbersSeen < 4) {
++pointer;
} else {
return failure;
}
}
if (!isASCIIDigit(input[pointer])) {

@@ -301,18 +310,13 @@ return failure;

if (dotsSeen < 3 && input[pointer] !== 46) {
return failure;
}
ip[piecePtr] = ip[piecePtr] * 0x100 + value;
if (dotsSeen === 1 || dotsSeen === 3) {
++numbersSeen;
if (numbersSeen === 2 || numbersSeen === 4) {
++piecePtr;
}
if (input[pointer] !== undefined) {
++pointer;
}
if (dotsSeen === 3 && input[pointer] !== undefined) {
if (input[pointer] === undefined && numbersSeen !== 4) {
return failure;
}
++dotsSeen;
}

@@ -414,2 +418,8 @@ }

// if trailing zeros
if (currLen > maxLen) {
maxIdx = currStart;
maxLen = currLen;
}
return {

@@ -528,3 +538,3 @@ idx: maxIdx,

this.parseError = true;
return false;
return failure;
}

@@ -576,3 +586,3 @@

this.parseError = true;
return false;
return failure;
}

@@ -579,0 +589,0 @@

{
"name": "whatwg-url",
"version": "4.2.0",
"version": "4.3.0",
"description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery",

@@ -5,0 +5,0 @@ "main": "lib/public-api.js",

@@ -7,3 +7,3 @@ # whatwg-url

whatwg-url is currently up to date with the URL spec up to commit [fbff68](https://github.com/whatwg/url/tree/fbff6834a8a03576261f777d0e0afea5c1bc5a09).
whatwg-url is currently up to date with the URL spec up to commit [a7ae1b](https://github.com/whatwg/url/tree/a7ae1b846b91d564229faeaafdd28cb7451faa1d).

@@ -10,0 +10,0 @@ ## API

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc