Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vulnerability): upgrade axios dependency #77

Merged
merged 6 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ npm/npmjs/-/attr-accept/2.2.2, MIT, approved, clearlydefined
npm/npmjs/-/autoprefixer/10.4.16, MIT, approved, #7494
npm/npmjs/-/available-typed-arrays/1.0.5, MIT, approved, clearlydefined
npm/npmjs/-/axe-core/4.8.2, MPL-2.0 AND MIT AND (Apache-2.0 AND OFL-1.1), approved, #10969
npm/npmjs/-/axios/0.27.2, MIT, approved, clearlydefined
npm/npmjs/-/axios/1.6.1, MIT, approved, #11338
npm/npmjs/-/axobject-query/3.2.1, Apache-2.0, approved, #9144
npm/npmjs/-/babel-jest/27.5.1, MIT, approved, clearlydefined
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@reduxjs/toolkit": "^1.8.1",
"@types/react-redux": "^7.1.22",
"@types/redux-actions": "^2.6.2",
"axios": "^0.27.2",
"axios": "^1.6.1",
"bootstrap": "^5.1.3",
"history": "^4.10.1",
"i18next": "^21.5.3",
Expand Down Expand Up @@ -59,7 +59,6 @@
"**/tough-cookie": "^4.1.3",
"**/webpack": "^5.76.0",
"**/@babel/traverse": "^7.23.2",
"**/axios": "^1.6.1",
"**/css-what": "^6.1.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import axios, {
AxiosError,
AxiosInstance,
AxiosRequestHeaders,
AxiosResponse,
RawAxiosRequestHeaders,
ResponseType,
} from 'axios'

Expand All @@ -42,7 +42,7 @@ export abstract class HttpClient {
baseURL: string,
reponseSuccessInterceptor = undefined,
responseErrorInterceptor = undefined,
headers: AxiosRequestHeaders = {
headers: RawAxiosRequestHeaders = {
'Content-Type': 'application/json',
},
timeout: number = Number.parseInt(
Expand Down
6 changes: 3 additions & 3 deletions src/services/RequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { AxiosRequestHeaders, ResponseType } from 'axios'
import { RawAxiosRequestHeaders, ResponseType } from 'axios'
import UserService from './UserService'

export const getHeaders = (): { headers: AxiosRequestHeaders } => ({
export const getHeaders = (): { headers: RawAxiosRequestHeaders } => ({
headers: {
authorization: `Bearer ${UserService.getToken()}`,
},
})

export const getBlobHeaders = (): {
headers: AxiosRequestHeaders
headers: RawAxiosRequestHeaders
responseType: ResponseType
} => ({
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/types/MainTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export type FileStatusValue = 'done' | 'rejected_file_type' | 'error_file_size'

export interface ProgressType {
loaded: number
total: number
total?: number
}

export interface PostDocumentType {
Expand Down
10 changes: 1 addition & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3230,14 +3230,6 @@ axe-core@^4.6.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.8.2.tgz#2f6f3cde40935825cf4465e3c1c9e77b240ff6ae"
integrity sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==

axios@^0.27.2:
version "0.27.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
dependencies:
follow-redirects "^1.14.9"
form-data "^4.0.0"

axios@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.1.tgz#76550d644bf0a2d469a01f9244db6753208397d7"
Expand Down Expand Up @@ -5268,7 +5260,7 @@ flatted@^3.2.9:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf"
integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==

follow-redirects@^1.0.0, follow-redirects@^1.14.9, follow-redirects@^1.15.0:
follow-redirects@^1.0.0, follow-redirects@^1.15.0:
version "1.15.3"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a"
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==
Expand Down