You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means a user can easily execute arbitray SQL code on your server, giving them the ability to read other users' data, or even just delete everything. The fact you're using a <select> for this value unfortunately doesn't help, since it's easy for a user to bypass client-side protection like that and submit anything they want. E.g. they could edit one of the <option>s to change the value to something like 1=1;DROP TABLE users;
It is very important to only ever use paramterized queries for this (i.e. pass user values as an array in the second argument to .query)
The text was updated successfully, but these errors were encountered:
week2-Minju-Hussain-Asmahan-George/database/model.js
Lines 20 to 28 in 576ce41
It's important to never insert user input into a DB query. This
WHERE
clause is coming directly from the user:week2-Minju-Hussain-Asmahan-George/routes/birthdays.js
Lines 23 to 30 in 576ce41
This means a user can easily execute arbitray SQL code on your server, giving them the ability to read other users' data, or even just delete everything. The fact you're using a
<select>
for this value unfortunately doesn't help, since it's easy for a user to bypass client-side protection like that and submit anything they want. E.g. they could edit one of the<option>
s to change the value to something like1=1;DROP TABLE users;
It is very important to only ever use paramterized queries for this (i.e. pass user values as an array in the second argument to
.query
)The text was updated successfully, but these errors were encountered: