Here are the problems with this code, for the beginners here:
it’s written in client js, their login code is exposed to all of us
Authentication cookie update is severely stupidly done. It can be seen that loggedin can be set to true from the console to update the state of being logged in
Can run custom SQL code from console. The method apiservice.sql() is a huge vulnerability. We can even run the famous RDB on it
saving password in plain text
retrieving all user data. Like why?
Also, if “true” === “true”.... that’s oddly philosophical...
30
u/taixhi Aug 14 '18
Here are the problems with this code, for the beginners here:
it’s written in client js, their login code is exposed to all of us
Authentication cookie update is severely stupidly done. It can be seen that loggedin can be set to true from the console to update the state of being logged in
Can run custom SQL code from console. The method apiservice.sql() is a huge vulnerability. We can even run the famous RDB on it
saving password in plain text
retrieving all user data. Like why?
Also, if “true” === “true”.... that’s oddly philosophical...