How can I prevent or make it as difficult as possible for a person or a malicious machine to make multiple entries on my site?
My form consists of 5 fields, which are:
- Name
- Surname
- Password
- Sex
Only email can not be repeated (2 people do not have the same email).
If you were a person performing manually for example, she could simply type +1 characters or slightly change the email and would already make a second registration (if the email is no longer being used).
If it were a robot, the situation would be even worse. I could fill out the form several times very quickly, not to mention that I could make direct requests (I'm using CSRF / XSRF protection from ASP.NET Razor Pages, but I do not know if it protects against it).
I thought about creating a cookie with the number of registrations that were made and then blocking, but it would not make much difference since it can be easily deleted by the malicious user.
If you help with anything, I'm making a request via Ajax with JQuery and validating the form on the server with a controller - Language: C #.
$.ajax({
type: 'POST',
url: '@Model.Swenity.Request.Address.ToString()request/register/registerAccount',
data: frmRegister.serialize(),
dataType: 'json',
beforeSend: function () {
// ...
},
success: function (response) {
// ...
},
error: function (request, status, error) {
// ...
}
});