我怎么能阻止用户在ASP.Net的文本框中输入回链接

时间:2023-01-27 16:00:37

I have website which is luckily on top of Google but there are spam messages with backlinks of different websites from spammers too so what i thought a solution to prevent visitors from putting back links in Multiline Text Area ? I have tried with required field validation and some other ways but unlucky yet. I am bit familiar with Javascript but after searching i did not find any javascript to prevent backlinks in text area. If any one can help me a bit or just give me an idea ?

我的网站很幸运地位于谷歌之上,但是垃圾邮件还有来自垃圾邮件发送者的不同网站的反向链接,所以我认为可以防止访问者在多行文本区域中放回链接的解决方案?我尝试过必要的现场验证和其他一些方法,但还不走运。我对Javascript有点熟悉,但搜索后我没有找到任何javascript来防止文本区域的反向链接。如果有人可以帮我一点或者只是给我一个想法?

1 个解决方案

#1


1  

Client-side validation is easy to bypass, but server-side validation should not.

客户端验证很容易绕过,但服务器端验证不应该。

I mean that client-side validation may work with human users but spam bots may send requests to your server bypassing your form or they even don't understand JavaScript.

我的意思是客户端验证可能适用于人类用户,但垃圾邮件机器人可能会绕过您的表单向您的服务器发送请求,或者他们甚至不理解JavaScript。

Do the whole client-side validation for human users but repeat the same validation in the server-side so no one will be able to bypass your rules.

为人类用户执行整个客户端验证,但在服务器端重复相同的验证,因此没有人能够绕过您的规则。

#1


1  

Client-side validation is easy to bypass, but server-side validation should not.

客户端验证很容易绕过,但服务器端验证不应该。

I mean that client-side validation may work with human users but spam bots may send requests to your server bypassing your form or they even don't understand JavaScript.

我的意思是客户端验证可能适用于人类用户,但垃圾邮件机器人可能会绕过您的表单向您的服务器发送请求,或者他们甚至不理解JavaScript。

Do the whole client-side validation for human users but repeat the same validation in the server-side so no one will be able to bypass your rules.

为人类用户执行整个客户端验证,但在服务器端重复相同的验证,因此没有人能够绕过您的规则。