Skip to content

Commit f69f00b

Browse files
Update lockfileVersion (#293)
1 parent 2e1dfa1 commit f69f00b

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 renamed to .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
@@ -30687,9 +30687,17 @@ AbortError.prototype = Object.create(Error.prototype);
3068730687
AbortError.prototype.constructor = AbortError;
3068830688
AbortError.prototype.name = 'AbortError';
3068930689

30690+
const URL$1 = Url.URL || whatwgUrl.URL;
30691+
3069030692
// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
3069130693
const PassThrough$1 = Stream.PassThrough;
30692-
const resolve_url = Url.resolve;
30694+
30695+
const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
30696+
const orig = new URL$1(original).hostname;
30697+
const dest = new URL$1(destination).hostname;
30698+
30699+
return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
30700+
};
3069330701

3069430702
/**
3069530703
* Fetch function
@@ -30777,7 +30785,19 @@ function fetch(url, opts) {
3077730785
const location = headers.get('Location');
3077830786

3077930787
// HTTP fetch step 5.3
30780-
const locationURL = location === null ? null : resolve_url(request.url, location);
30788+
let locationURL = null;
30789+
try {
30790+
locationURL = location === null ? null : new URL$1(location, request.url).toString();
30791+
} catch (err) {
30792+
// error here can only be invalid URL in Location: header
30793+
// do not throw when options.redirect == manual
30794+
// let the user extract the errorneous redirect URL
30795+
if (request.redirect !== 'manual') {
30796+
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
30797+
finalize();
30798+
return;
30799+
}
30800+
}
3078130801

3078230802
// HTTP fetch step 5.5
3078330803
switch (request.redirect) {
@@ -30825,6 +30845,12 @@ function fetch(url, opts) {
3082530845
size: request.size
3082630846
};
3082730847

30848+
if (!isDomainOrSubdomain(request.url, locationURL)) {
30849+
for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
30850+
requestOpts.headers.delete(name);
30851+
}
30852+
}
30853+
3082830854
// HTTP-redirect fetch step 9
3082930855
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
3083030856
reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));

0 commit comments

Comments
 (0)