Skip to content

Commit

Permalink
Merge pull request #207 from axios/v1.x
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio committed Jan 1, 2024
2 parents 1937004 + 1542719 commit 496d63b
Show file tree
Hide file tree
Showing 21 changed files with 100 additions and 32 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
# types: [ notify ]
release:
types: [ published ]
branches:
- main
- 'v**'
workflow_dispatch:
inputs:
tag:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [1.6.3](https://github.com/axios/axios/compare/v1.6.2...v1.6.3) (2023-12-26)


### Bug Fixes

* Regular Expression Denial of Service (ReDoS) ([#6132](https://github.com/axios/axios/issues/6132)) ([5e7ad38](https://github.com/axios/axios/commit/5e7ad38fb0f819fceb19fb2ee5d5d38f56aa837d))

### Contributors to this release

- <img src="https://avatars.githubusercontent.com/u/4814473?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+15/-6 (#6145 )")
- <img src="https://avatars.githubusercontent.com/u/22686401?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Willian Agostini](https://github.com/WillianAgostini "+17/-2 (#6132 )")
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+3/-0 (#6084 )")

## [1.6.2](https://github.com/axios/axios/compare/v1.6.1...v1.6.2) (2023-11-14)


Expand Down
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,45 @@
<h1 align="center">
<b>
<a href="https://axios-http.com"><img src="https://axios-http.com/assets/logo.svg" /></a><br>
</b>
</h1>
<h3 align="center">
Platinum sponsors
<br>
</h3>

<div align="center">
<a href="https://runalloy.com?utm_source=github&utm_medium=referral&utm_campaign=121423_axios">
<picture>
<source width="400px" media="(prefers-color-scheme: dark)" srcset="https://github.com/axios/axios/assets/4814473/f6067247-7eba-4069-852a-ab1bb85b1780">
<source width="400px" media="(prefers-color-scheme: light)" srcset="https://github.com/axios/axios/assets/4814473/75c37f4d-36e6-44f5-a068-3edd77c00a10">
<img width="400px" src="https://github.com/axios/axios/assets/4814473/75c37f4d-36e6-44f5-a068-3edd77c00a10" />
</picture>
</a>
<p>Alloy is the integration development platform that makes it simple and <br>fast for SaaS companies to launch critical user-facing integrations.</p>
<br><br>
</div>

<h3 align="center">
Gold sponsors
<br><br>
</h3>

<div align="center">
<a href="https://stytch.com?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=logo&utm_campaign=axios-http">
<picture>
<source width="200px" media="(prefers-color-scheme: dark)" srcset="https://github.com/axios/axios/assets/4814473/538d715a-13c7-4668-ae7d-37a4548423f4">
<source width="200px" media="(prefers-color-scheme: light)" srcset="https://github.com/axios/axios/assets/4814473/538d715a-13c7-4668-ae7d-37a4548423f4">
<img width="200px" src="https://github.com/axios/axios/assets/4814473/538d715a-13c7-4668-ae7d-37a4548423f4" />
</picture>
</a>
<p align="center">API-first authentication, authorization, and fraud prevention</p>
<p align="center">
<a href="https://stytch.com?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=website-link&utm_campaign=axios-http"><b>Website</b></a> •
<a href="https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=docs-link&utm_campaign=axios-http"><b>Documentation</b></a> • <a href="https://github.com/stytchauth/stytch-node?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=node-sdk&utm_campaign=axios-http"><b>Node.js Backend SDK</b></a>
</p>
</div>

<br><br>
<div align="center">
<a href="https://axios-http.com"><img src="https://axios-http.com/assets/logo.svg" /></a><br>
</div>

<p align="center">Promise based HTTP client for the browser and node.js</p>

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "axios",
"main": "./dist/axios.js",
"version": "1.6.2",
"version": "1.6.3",
"homepage": "https://axios-http.com",
"authors": [
"Matt Zabriskie"
Expand Down
6 changes: 3 additions & 3 deletions dist/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/axios.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/browser/axios.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Axios v1.6.2 Copyright (c) 2023 Matt Zabriskie and contributors
// Axios v1.6.3 Copyright (c) 2023 Matt Zabriskie and contributors
'use strict';

function bind(fn, thisArg) {
Expand Down Expand Up @@ -2021,7 +2021,7 @@ function isAbsoluteURL(url) {
*/
function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}

Expand Down Expand Up @@ -2655,7 +2655,7 @@ function mergeConfig(config1, config2) {
return config;
}

const VERSION = "1.6.2";
const VERSION = "1.6.3";

const validators$1 = {};

Expand Down
2 changes: 1 addition & 1 deletion dist/browser/axios.cjs.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/esm/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/axios.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/axios.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/node/axios.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Axios v1.6.2 Copyright (c) 2023 Matt Zabriskie and contributors
// Axios v1.6.3 Copyright (c) 2023 Matt Zabriskie and contributors
'use strict';

const FormData$1 = require('form-data');
Expand Down Expand Up @@ -1998,7 +1998,7 @@ function isAbsoluteURL(url) {
*/
function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}

Expand All @@ -2019,7 +2019,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL;
}

const VERSION = "1.6.2";
const VERSION = "1.6.3";

function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
Expand Down
2 changes: 1 addition & 1 deletion dist/node/axios.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/env/data.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "1.6.2";
export const VERSION = "1.6.3";
2 changes: 1 addition & 1 deletion lib/helpers/combineURLs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
*/
export default function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axios",
"version": "1.6.2",
"version": "1.6.3",
"description": "Promise based HTTP client for the browser and node.js",
"main": "index.js",
"exports": {
Expand Down
17 changes: 16 additions & 1 deletion test/specs/defaults.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,25 @@ describe('defaults', function () {
const instance = axios.create();
axios.defaults.baseURL = 'http://example.org/';

instance.get('/foo/users');

getAjaxRequest().then(function (request) {
expect(request.url).toBe('/foo/users');
done();
});
});

it('should resistent to ReDoS attack', function (done) {
const instance = axios.create();
const start = performance.now();
const slashes = '/'.repeat(100000);
instance.defaults.baseURL = '/' + slashes + 'bar/';
instance.get('/foo');

getAjaxRequest().then(function (request) {
expect(request.url).toBe('/foo');
const elapsedTimeMs = performance.now() - start;
expect(elapsedTimeMs).toBeLessThan(20);
expect(request.url).toBe('/' + slashes + 'bar/foo');
done();
});
});
Expand Down

0 comments on commit 496d63b

Please sign in to comment.