Web user input should be restricted as follows

In the web, all the places where you can enter. Both should do the following.

1=>不能够输入script关键字,如果用户输入了。进行提示。然后删除用户输入的值
(这样比较粗暴,不太友好)

2=>用户输入了含有script关键时,对用户进行提示。(然后将这个这个关键字清除掉)

3=> 用户输入时,应该有限制用户的字符。不能够无限制的输入。这样可能会造成数据库溢出

When users upload files. Should do the following

1==》限制用户上传的文件个数

2==>限制用户删除上传的文件的大小

3==>检查上传的文件是否符合要求。
(期待用户上传的时图片,结果用户上传的时视频)

I have thought so much for the time being, and I will remember later, I am writing

Guess you like

Origin www.cnblogs.com/IwishIcould/p/12716441.html