Home Web Front-end HTML Tutorial Post data html data acquisition risk handling method_html/css_WEB-ITnose

Post data html data acquisition risk handling method_html/css_WEB-ITnose

Jun 24, 2016 am 11:48 AM

Basic knowledge

The ValidateRequest attribute is a commonly used attribute in the Page class, used to indicate whether the input Data is checked for potential hazards. By default, it is True, which means "the entered data is checked for potential risks." This attribute will check the potential risks of the data submitted by the page to the server. So why is it necessary to check for potential risks?

In fact, ValidateRequest can be regarded as a security mechanism, which can prevent some codes from insecurely infringing on the client. Everyone knows that the server cannot be connected to just one computer, as long as its domain name can be accessed All can be accessed, so it is very important to check the security of the server, so there is a ValidateRequest attribute. However, some people ask that since this attribute is related to security, why should developers choose whether to perform security testing?

Many projects now have that kind of online editor. What you see can save time when writing projects. When you need to do this, the ValidtaeRequest attribute of the page must be False, otherwise submit it. Just report a security issue, let alone see the effect of this code.

Now it is estimated that VS2005 and VS2008 are used the most. A few days ago I downloaded a trial version of VS2010 Ultimate. An installation file of VS2008 is about 4.2G, and VS2010 Ultimate The version is only about 2.5G. Not only has the capacity been reduced, but some unsafe and unstable attributes are no longer supported. At that time, I set ValidateResquest=false in the Page command, then Ctrl F5 started the page, and dragged the TextBox text on the page. Enter <script> in the box, and then use the server-side Button to submit, the page will report an error, as shown in the figure </p> <p></p> <p class="sycode"> </p> <p>It says from the client (TextBox1="&lt ;script></script>") A potentially dangerous Request.Form value was detected, which means that there is unsafe information in the form submission information. Friends with good eyesight may be able to see that I have added it to the Page. ValidateResquest="false", and also added Debug="true", look at an error page with only ValidateResquest="false" added, as shown in the figure

The above picture is the error page that is run after adding only the ValidateResquest="false" attribute value. Then the page gives 2 suggestions. 1 is to add the Debug="true" attribute to the Page. value, then we follow its instructions. We added Debug="true" to the Page and still got an error after running, as shown in the figure

The above picture is the error page after adding the Debug="true" attribute value. So how to prevent the page from detecting security information issues when both ValidateResquest="false" and Debug="true" are useless? In fact, everyone knows that 2010 can open projects produced in 2008 or 2005, which is backward compatible. Then we will use the principle of backward compatibility to solve the problem of not detecting security information on the page. ASP.NET allows us to pass the web. Configure in config to use the request verification behavior of ASP.NET 2.0: , so that no error will be reported when the page is submitted again, as shown in the figure

The layout of VS2005 is almost the same as that of 2008, but the layout in VS2010 has changed a lot. One of the highlights of VS2010 is the addition of MVC2, which is really powerful. I can only sigh. Microsoft's cloning ability is so powerful. Since the introduction of MVC in Java, it has been sought after by many software development engineers. Microsoft is naturally not to be outdone. It also launched MVC2 in 2010, making the project hierarchy clearer and making collaborative development better. , VS2010 defaults to .Net Framework 4 and is compatible with all previous versions.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

See all articles