Reputation: 31
I am working on deploying a React application with Redux. I have a client side and server side of the project.
After running the project locally with "yarn start," when I press F12, I can see the files of my react components and redux actions. My main concern is whether or not users can access these files, modify them, and execute them, which might lead to modifying my database and using someone else's profile.
So my question is:
Do users have access to the src folder and its contents of a React application?
Do users have access to the public folder and its contents of a React application?
If so, can users modify the files inside these folders and execute them in a way that would cause problems like the ones mentioned above?
Upvotes: 1
Views: 1064
Reputation: 113
All the answers are NO.
Once you want to publich the project, remember to run yarn build
, which set the project to production mode and information like folders and source files are not included (by default).
However users can see compressed react components and redux actions and can modify and execute them on their local devices, but they cannot influence your files on servers or what other users get. But if your server side program can access database or write files, remember to verify EVERYTHING from client side to avoid attack.
Upvotes: 1