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

@forge/egress

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/egress - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1-next.0

6

CHANGELOG.md
# @forge/egress
## 1.2.1-next.0
### Patch Changes
- f18ccd86: Fixed bug greedily extracting the protocol from provided egress domains
## 1.2.0

@@ -4,0 +10,0 @@

1

out/egress/egress-filtering-service.d.ts

@@ -5,3 +5,2 @@ export declare class EgressFilteringService {

private readonly allowsEverything;
private readonly DEFAULT_PROTOCOL;
constructor(allowList: string[]);

@@ -8,0 +7,0 @@ private parseUrl;

@@ -9,3 +9,2 @@ "use strict";

constructor(allowList) {
this.DEFAULT_PROTOCOL = 'https://';
this.URLs = allowList.filter((domainOrURL) => !domainOrURL.startsWith('*')).map((url) => this.parseUrl(url));

@@ -19,5 +18,3 @@ this.wildcardDomains = allowList

parseUrl(url) {
const protocolRegex = /^(.*:\/\/)/;
const urlWithProtocol = protocolRegex.test(url) ? url : `${this.DEFAULT_PROTOCOL}${url}`;
return (0, url_parser_1.parseUrl)(urlWithProtocol);
return (0, url_parser_1.parseUrl)(url);
}

@@ -24,0 +21,0 @@ isValidUrl(url) {

@@ -6,6 +6,9 @@ "use strict";

var _a, _b;
const protocol = (_b = (_a = url.match(/^(.*:\/\/)/)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : 'https://';
const hostname = url.replace(protocol, '').split(/[\/?]/)[0];
const protocol = (_b = (_a = url.match(/^(.*?:)/)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : 'https:';
const hostname = url
.replace(protocol, '')
.replace(/^\/*/, '')
.split(/[\?\/]/)[0];
return { protocol, hostname };
}
exports.parseUrl = parseUrl;
{
"name": "@forge/egress",
"version": "1.2.0",
"version": "1.2.1-next.0",
"description": "Helpers and utils for egress implementation in Forge apps",

@@ -5,0 +5,0 @@ "main": "out/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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