Security Error "code:" 1000 error method in Firefox

Source: Internet
Author: User
Tags empty file upload file url

Today in the development of the "Security Error" code: "1000" error, some inexplicable, one is because this error description is the first time to see, and secondly because I just made a very simple form, which also has four or five input boxes and a file upload control.

Look at its meaning, seems to be related to the safety of the error, so the Internet check, the original, when trying to give type= "file" input box assignment, Firefox will report this error, because considering the security of user data, FileUpload control is designed as read-only, So can not be assigned to it manually, the value inside it must be clicked through the user click the button to generate the path, otherwise, developers or other people can control the page script, you can upload the client's designated files, so that will leave a great security risks.

Now that we know the source of the problem, the solution to the problem is naturally come out, that is, to the fileupload element of the assignment statement can be removed, and in the preservation of the time, if no upload file will overwrite the existing file URL, make a judgment in the back, see whether this value is empty, empty is retained, Non-empty and then cover it.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/tools/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.