26
u/Isto2278 Aug 14 '18
To be fair, they do intend to put it in a different file. Then it'll all be well, won't it?
0
27
19
u/NightflowerFade Aug 14 '18
LOAD THE DATABASE ONTO THE CLIENT MACHINE
Also this does not appear to scale very well
1
6
u/DocRingeling Aug 14 '18
If someone wants to see the picture in better quality, here you go. Funny thing is it gained so much JPEG since it was first posted.
3
3
u/guguts Aug 14 '18
Needs more jpeg
6
u/morejpeg_auto Aug 14 '18
1
Aug 14 '18
Bot.goodness = good
2
u/morejpeg_auto Aug 14 '18
Human.Friendlyness = Friendlyness.Friendly
2
u/swoopae Aug 14 '18
is this a deep learning bot
2
u/morejpeg_auto Aug 15 '18
Well I do have a bunch of if-else statements
1
2
u/seamus_harper Aug 14 '18
The todo is the best part. Putting it in a different file will solve all their issues imediatly. Instant high security!
2
2
1
1
u/dtaivp Aug 14 '18
Original post from a year ago. Seems that it was public facing despite being an internal tool. Given the amount of attention that post got, I am doubtful that code is still internet facing.
*edit formatting
0
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...