Skip to content

Conversation

WillianAgostini
Copy link
Contributor

Fixes issue #6778 by replacing Math.random function to crypto module

@DigitalBrainJS DigitalBrainJS merged commit 23a25af into axios:v1.x Feb 18, 2025
9 checks passed
@WillianAgostini WillianAgostini deleted the fix/6778 branch February 18, 2025 12:57
@github-actions github-actions bot mentioned this pull request Feb 25, 2025
Copy link
Contributor

Hi, @WillianAgostini! This PR has been published in v1.8.0 release. Thank you for your contribution ❤️!

@saad-lg
Copy link

saad-lg commented Feb 26, 2025

I just wanted to point out that adding import of crypto module is breaking react native apps.
"import bind from './helpers/bind.js';

  • import crypto from 'crypto'; "

@hex-ci
Copy link

hex-ci commented Feb 26, 2025

This change will cause a warning when building a project with Vite v6.2.0, stating "Module 'crypto' has been externalized for browser compatibility". It appears that the 'crypto' module should not be used directly in the browser, and I am unsure if there will be any actual impact.

@codeion
Copy link

codeion commented Feb 26, 2025

I completely understand the security rationale behind this change, and I appreciate the effort to improve security. However, cutting off the entire React Native community (#6778) doesn’t seem like the best approach. Personally, I’d prefer not to have to patch Axios in my project :(

@jasonsaayman
Copy link
Member

yip sorry my fault im working on a fix right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants