Riley Rilwan Riley Rilwan - 3 days ago 4
SQL Question

Can a website block user depending on their behaviour or give 404 error to that user?


  1. Like if user is giving wrong index continues for like SQL injection

  2. OR Like if user is giving wrong index continues for like DOS attack

  3. Or if i don't want any visitors from certain country
    I just wanna know weather it's possible or not, if yes how it works?


Answer

Yes, it can, but I don't think a 404 is suitable. 404 is used when a certain resource isn't found

  1. would probably result in a 400 bad request on the input validation
  2. could result in 503 service unavailable if your service handles this, altough a firewall should detect DOS attack and block the client
  3. maybe 403 forbidden?

other http codes may be applicable also, see https://en.wikipedia.org/wiki/List_of_HTTP_status_codes for a full list.

Comments