Skip to content

Commit 5ee0fe1

Browse files
dmitry-shibanovmdvorak
authored andcommittedMar 16, 2022
Update lockfileVersion (#293)
1 parent 9eec803 commit 5ee0fe1

File tree

7 files changed

+6729
-18
lines changed

7 files changed

+6729
-18
lines changed
 

‎.github/workflows/licensed.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install licensed
2020
run: |
2121
cd $RUNNER_TEMP
22-
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-linux-x64.tar.gz
22+
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.4.4/licensed-3.4.4-linux-x64.tar.gz
2323
sudo tar -xzf licensed.tar.gz
2424
sudo mv licensed /usr/local/bin/licensed
2525
- run: licensed status

‎.licenses/npm/@types/node-12.20.4.dep.yml ‎.licenses/npm/@types/node-16.11.25.dep.yml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/node-fetch.dep.yml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/cleanup/index.js

+28-2
Original file line numberDiff line numberDiff line change
@@ -43501,9 +43501,17 @@ AbortError.prototype = Object.create(Error.prototype);
4350143501
AbortError.prototype.constructor = AbortError;
4350243502
AbortError.prototype.name = 'AbortError';
4350343503

43504+
const URL$1 = Url.URL || whatwgUrl.URL;
43505+
4350443506
// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
4350543507
const PassThrough$1 = Stream.PassThrough;
43506-
const resolve_url = Url.resolve;
43508+
43509+
const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
43510+
const orig = new URL$1(original).hostname;
43511+
const dest = new URL$1(destination).hostname;
43512+
43513+
return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
43514+
};
4350743515

4350843516
/**
4350943517
* Fetch function
@@ -43591,7 +43599,19 @@ function fetch(url, opts) {
4359143599
const location = headers.get('Location');
4359243600

4359343601
// HTTP fetch step 5.3
43594-
const locationURL = location === null ? null : resolve_url(request.url, location);
43602+
let locationURL = null;
43603+
try {
43604+
locationURL = location === null ? null : new URL$1(location, request.url).toString();
43605+
} catch (err) {
43606+
// error here can only be invalid URL in Location: header
43607+
// do not throw when options.redirect == manual
43608+
// let the user extract the errorneous redirect URL
43609+
if (request.redirect !== 'manual') {
43610+
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
43611+
finalize();
43612+
return;
43613+
}
43614+
}
4359543615

4359643616
// HTTP fetch step 5.5
4359743617
switch (request.redirect) {
@@ -43639,6 +43659,12 @@ function fetch(url, opts) {
4363943659
size: request.size
4364043660
};
4364143661

43662+
if (!isDomainOrSubdomain(request.url, locationURL)) {
43663+
for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
43664+
requestOpts.headers.delete(name);
43665+
}
43666+
}
43667+
4364243668
// HTTP-redirect fetch step 9
4364343669
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
4364443670
reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));

‎dist/setup/index.js

+28-2
Original file line numberDiff line numberDiff line change
@@ -30699,9 +30699,17 @@ AbortError.prototype = Object.create(Error.prototype);
3069930699
AbortError.prototype.constructor = AbortError;
3070030700
AbortError.prototype.name = 'AbortError';
3070130701

30702+
const URL$1 = Url.URL || whatwgUrl.URL;
30703+
3070230704
// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
3070330705
const PassThrough$1 = Stream.PassThrough;
30704-
const resolve_url = Url.resolve;
30706+
30707+
const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
30708+
const orig = new URL$1(original).hostname;
30709+
const dest = new URL$1(destination).hostname;
30710+
30711+
return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
30712+
};
3070530713

3070630714
/**
3070730715
* Fetch function
@@ -30789,7 +30797,19 @@ function fetch(url, opts) {
3078930797
const location = headers.get('Location');
3079030798

3079130799
// HTTP fetch step 5.3
30792-
const locationURL = location === null ? null : resolve_url(request.url, location);
30800+
let locationURL = null;
30801+
try {
30802+
locationURL = location === null ? null : new URL$1(location, request.url).toString();
30803+
} catch (err) {
30804+
// error here can only be invalid URL in Location: header
30805+
// do not throw when options.redirect == manual
30806+
// let the user extract the errorneous redirect URL
30807+
if (request.redirect !== 'manual') {
30808+
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
30809+
finalize();
30810+
return;
30811+
}
30812+
}
3079330813

3079430814
// HTTP fetch step 5.5
3079530815
switch (request.redirect) {
@@ -30837,6 +30857,12 @@ function fetch(url, opts) {
3083730857
size: request.size
3083830858
};
3083930859

30860+
if (!isDomainOrSubdomain(request.url, locationURL)) {
30861+
for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
30862+
requestOpts.headers.delete(name);
30863+
}
30864+
}
30865+
3084030866
// HTTP-redirect fetch step 9
3084130867
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
3084230868
reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));

0 commit comments

Comments
 (0)