Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.
Open
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
210 changes: 162 additions & 48 deletions loginnext/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 loginnext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.5.0",
"axios": "^1.12.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While upgrading axios is a crucial step to address the security vulnerability SNYK-JS-AXIOS-12613773, it's important to take further action to fully mitigate the 'Allocation of Resources Without Limits or Throttling' issue. I recommend explicitly setting limits on both the request body and response body size in your axios instances.

For example, in loginnext/src/api/axios.js, you can add maxBodyLength and maxContentLength to your axios.create configurations:

const SAFE_PAYLOAD_LIMIT = 10 * 1024 * 1024; // 10MB limit, adjust as needed

export default axios.create({
    baseURL: BASE_URL,
    headers:{
        "Access-Control-Allow-Origin": true
    },
    maxContentLength: SAFE_PAYLOAD_LIMIT,
    maxBodyLength: SAFE_PAYLOAD_LIMIT
});

export const axiosPrivate = axios.create({
    baseURL: BASE_URL,
    headers: { 'Content-Type': 'application/json' },
    withCredentials: true,
    maxContentLength: SAFE_PAYLOAD_LIMIT,
    maxBodyLength: SAFE_PAYLOAD_LIMIT
});

This will prevent potential Denial of Service (DoS) attacks where a malicious client or server could send an extremely large payload. Please adjust the limit according to your application's needs.

"dotenv": "^16.3.1",
"localforage": "^1.10.0",
"match-sorter": "^6.3.1",
Expand Down