Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How safe is front end with react and redux?

I am wondering this for a while now when I am building react and redux applications. How easy is it for a person to change the redux and/or react state manually? I can't find documentation on this anywhere and would love to know the security issues etc.

Example of a redux state

{
    firstName: 'Foo',
    lastName: 'Bar',
    permissions: {
        'admin': false
    }
}

Would they be able to change or influence something like the admin permission and set it to true?

And if they can change it, would it be accepted by reducers etc?

like image 678
NealVDV Avatar asked Dec 22 '16 18:12

NealVDV


1 Answers

The frontend is inherently insecure. I can inject my own code any time. Setup breakpoints and manipulate variables during runtime. With that in mind. I could put anything I wanted in a redux store and get any value out of it. This includes setting an admin permission/flag to true. I could also trigger the reducers to run with the new value.

like image 134
TheSharpieOne Avatar answered Oct 12 '22 01:10

TheSharpieOne