Picto thématique

Rule n° 205 - The server sends activation information for protection against cross-site scripting.

Cross-site scripting is an attack that consists of injecting and executing malicious content on a page. Some browsers have built-in filtering mechanisms to protect against certain types of these attacks, mechanisms that can unfortunately be disabled. In order to prevent your site from putting users at risk, it is therefore advisable to force the presence of the protection header and to play it safe for the visitor by blocking all the content of the page.

#Development #Security

Goal

  • Reduce the risk of downloading dangerous hidden content.

Implementation

Configure the server to send the X-XSS-Protection HTTP header with the value 1; mode=block.

Control

When it comes to security, you can never take enough precautions. Since some of these so-called cross-site scripting attacks are detectable by browsers, you should not hesitate for a second and use this advantage to the maximum: even if some browsers offer to clean up dangerous content (sanitize), it is better not to take any risks and to explicitly tell them to activate these filters and block the entire page.

By Opquast - Read the license


Discover Opquast training and certification

The objective of these rules and the Opquast community mission is ‘making the web better’ for your customers and for everyone! Opquast rules cover the key major areas of risk that can negatively affect website users such as privacy, ecodesign, accessibility and security.

Opquast training has already allowed over 19,000 web professionals to have their skills certified. Train your teams, contact us

We offer a 1 hour free discovery module.