2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00
Files
Anchal Singh 88d7884254 feat: enhance pipeFileToResponse with error handling (#7169)
* Enhance pipeFileToResponse with error handling

Added error handling for file streaming in pipeFileToResponse function.

* Security: Fix path traversal vulnerability in pipeFileToResponse with input validation and error handling

Security: Enhance file streaming with comprehensive path validation

- Add path traversal protection in pipeFileToResponse function
- Implement input validation to prevent directory traversal attacks
- Improve error handling for file read operations with proper status codes
- Ensure resolved paths stay within intended directory boundaries
- Add security checks using path.resolve() and startsWith() methods
- Fix CodeQL "Uncontrolled data in path expression" vulnerability
- Maintain backward compatibility while enhancing security

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-05 09:12:15 +02:00
..
2022-10-30 19:14:27 +02:00
2022-06-18 11:19:27 +02:00

axios examples

To run the examples:

  1. git clone https://github.com/axios/axios.git
  2. cd axios
  3. npm install
  4. npm run build
  5. npm run examples
  6. http://localhost:3000