freeCodeCamp/curriculum/challenges/spanish/06-information-security-and.../information-security-with-h.../prevent-ie-from-opening-unt...

1.5 KiB

id title challengeType videoUrl localeTitle
587d8248367417b2b2512c3b Prevent IE from Opening Untrusted HTML with helmet.ieNoOpen() 2 Evita que IE abra HTML no confiable con helmet.ieNoOpen ()

Description

Como recordatorio, este proyecto se está construyendo sobre el siguiente proyecto de inicio en Glitch , o clonado desde GitHub . Algunas aplicaciones web servirán HTML no confiable para descargar. Algunas versiones de Internet Explorer abren esos archivos HTML en el contexto de su sitio. Esto significa que una página HTML no confiable podría comenzar a hacer cosas malas en el contexto de sus páginas. Este middleware establece el encabezado X-Download-Options en noopen. Esto evitará que los usuarios de IE ejecuten descargas en el contexto del sitio de confianza.

Instructions

Tests

tests:
  - text: El middleware helmet.ieNoOpen () se debe montar correctamente
    testString: 'getUserInput => $.get(getUserInput("url") + "/_api/app-info").then(data => { assert.include(data.appStack, "ienoopen"); assert.equal(data.headers["x-download-options"], "noopen"); }, xhr => { throw new Error(xhr.responseText); })'

Challenge Seed

Solution

// solution required