chore(i18n,curriculum): update translations (#42930)

This commit is contained in:
camperbot
2021-07-19 22:22:21 +05:30
committed by GitHub
parent 31486b368b
commit 7dcb77fa6f
124 changed files with 727 additions and 727 deletions

View File

@@ -1,6 +1,6 @@
---
id: 587d8248367417b2b2512c3c
title: Ask Browsers to Access Your Site via HTTPS Only with helmet.hsts()
title: Chiedere ai browser di accedere al tuo sito solo tramite HTTPS con helmet.hsts()
challengeType: 2
forumTopicId: 301573
dashedName: ask-browsers-to-access-your-site-via-https-only-with-helmet-hsts
@@ -8,19 +8,19 @@ dashedName: ask-browsers-to-access-your-site-via-https-only-with-helmet-hsts
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
HTTP Strict Transport Security (HSTS) is a web security policy which helps to protect websites against protocol downgrade attacks and cookie hijacking. If your website can be accessed via HTTPS you can ask users browsers to avoid using insecure HTTP. By setting the header Strict-Transport-Security, you tell the browsers to use HTTPS for the future requests in a specified amount of time. This will work for the requests coming after the initial request.
HTTP Strict Transport Security (HSTS) è una politica di sicurezza web che aiuta a proteggere i siti Web dagli attacchi di downgrade del protocollo e dal dirottamento dei cookie. Se è possibile accedere al sito web tramite HTTPS è possibile chiedere ai browser dellutente di evitare di utilizzare HTTP non protetto. Impostando l'intestazione Strict-Transport-Security, si dice ai browser di utilizzare HTTPS per le future richieste in un determinato lasso di tempo. Questo funzionerà per le richieste pervenute dopo la richiesta iniziale.
# --instructions--
Configure `helmet.hsts()` to use HTTPS for the next 90 days. Pass the config object `{maxAge: timeInSeconds, force: true}`. You can create a variable `ninetyDaysInSeconds = 90*24*60*60;` to use for the `timeInSeconds`. Replit already has hsts enabled. To override its settings you need to set the field "force" to true in the config object. We will intercept and restore the Replit header, after inspecting it for testing.
Configurare `helmet.hsts()` in modo che utilizza HTTPS per i prossimi 90 giorni. Passa l'oggetto di configurazione `{maxAge: timeInSeconds, force: true}`. Puoi creare una variabile `ninetyDaysInSeconds = 90*24*60*60;` da usare per il `timeInSeconds`. Replit ha già hsts abilitato. Per sovrascrivere le sue impostazioni è necessario impostare il campo "force" a true nell'oggetto di configurazione. Intercetteremo e ripristineremo l'intestazione di Replit, dopo averla ispezionata per il test.
Note: Configuring HTTPS on a custom website requires the acquisition of a domain, and a SSL/TLS Certificate.
Nota: la configurazione di HTTPS su un sito web personalizzato richiede l'acquisizione di un dominio e di un certificato SSL/TLS.
# --hints--
helmet.hsts() middleware should be mounted correctly
Il middleware helmet.hsts() deve essere montato correttamente
```js
(getUserInput) =>
@@ -35,7 +35,7 @@ helmet.hsts() middleware should be mounted correctly
);
```
maxAge should be equal to 7776000 s (90 days)
maxAge deve essere uguale a 7776000 s (90 giorni)
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8248367417b2b2512c3a
title: Avoid Inferring the Response MIME Type with helmet.noSniff()
title: Evitare di dedurre il tipo MIME della risposta con helmet.noSniff()
challengeType: 2
forumTopicId: 301574
dashedName: avoid-inferring-the-response-mime-type-with-helmet-nosniff
@@ -8,15 +8,15 @@ dashedName: avoid-inferring-the-response-mime-type-with-helmet-nosniff
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/). Browsers can use content or MIME sniffing to override response `Content-Type` headers to guess and process the data using an implicit content type. While this can be convenient in some scenarios, it can also lead to some dangerous attacks. This middleware sets the X-Content-Type-Options header to `nosniff`, instructing the browser to not bypass the provided `Content-Type`.
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/). I browser possono usare lo sniffing del contenuto o del MIME per sovrascrivere le intestazioni `Content-Type` per indovinare ed elaborare i dati utilizzando un tipo di contenuto implicito. Anche se questo può essere conveniente in alcuni scenari, può anche portare ad alcuni attacchi pericolosi. Questo middleware imposta l'intestazione X-Content-Type-Options a `nosniff`, istruendo il browser di non bypassare il tipo di contenuto fornito `Content-Type`.
# --instructions--
Use the `helmet.noSniff()` method on your server.
Usa il metodo `helmet.noSniff()` sul tuo server.
# --hints--
helmet.noSniff() middleware should be mounted correctly
Il middleware helmet.noSniff() deve essere montato correttamente
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8249367417b2b2512c40
title: Configure Helmet Using the parent helmet() Middleware
title: Configurare Helmet usando il middleware 'genitore' helmet()
challengeType: 2
forumTopicId: 301575
dashedName: configure-helmet-using-the-parent-helmet-middleware
@@ -8,11 +8,11 @@ dashedName: configure-helmet-using-the-parent-helmet-middleware
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
`app.use(helmet())` will automatically include all the middleware introduced above, except `noCache()`, and `contentSecurityPolicy()`, but these can be enabled if necessary. You can also disable or configure any other middleware individually, using a configuration object.
`app.use(helmet())` includerà automaticamente tutto il middleware introdotto sopra, tranne `noCache()`, e `contentSecurityPolicy()`, ma questi possono essere abilitati se necessario. È inoltre possibile disabilitare o configurare qualsiasi altro middleware singolarmente, utilizzando un oggetto di configurazione.
**Example:**
**Esempio:**
```js
app.use(helmet({
@@ -29,11 +29,11 @@ app.use(helmet({
}))
```
We introduced each middleware separately for teaching purposes and for ease of testing. Using the parent `helmet()` middleware is easy to implement in a real project.
Abbiamo introdotto ogni middleware separatamente per scopi didattici e per facilità di test. L'utilizzo del middleware 'genitore' `helmet()` è facile da implementare in un progetto reale.
# --hints--
no tests - it's a descriptive challenge
nessun test - è una sfida descrittiva
```js
assert(true);

View File

@@ -1,6 +1,6 @@
---
id: 587d8249367417b2b2512c3e
title: Disable Client-Side Caching with helmet.noCache()
title: Disabilitare il caching dal lato client con helmet.noCache()
challengeType: 2
forumTopicId: 301576
dashedName: disable-client-side-caching-with-helmet-nocache
@@ -8,17 +8,17 @@ dashedName: disable-client-side-caching-with-helmet-nocache
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
If you are releasing an update for your website, and you want the users to always download the newer version, you can (try to) disable caching on clients browser. It can be useful in development too. Caching has performance benefits, which you will lose, so only use this option when there is a real need.
Se stai rilasciando un aggiornamento per il tuo sito web, e vuoi che gli utenti scarichino sempre la versione più recente, puoi (provare a) disabilitare la cache sul browser del client. Può essere utile anche in fase di sviluppo. Il caching ha benefici sulle prestazioni, che perderai, quindi usa questa opzione solo quando c'è una vera necessità.
# --instructions--
Use the `helmet.noCache()` method on your server.
Usa il metodo `helmet.noCache()` sul tuo server.
# --hints--
helmet.noCache() middleware should be mounted correctly
Il middleware helmet.noCache() deve essere montato correttamente
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8248367417b2b2512c3d
title: Disable DNS Prefetching with helmet.dnsPrefetchControl()
title: Disabilitare il precaricamento DNS con helmet.dnsPrefetchControl()
challengeType: 2
forumTopicId: 301577
dashedName: disable-dns-prefetching-with-helmet-dnsprefetchcontrol
@@ -8,17 +8,17 @@ dashedName: disable-dns-prefetching-with-helmet-dnsprefetchcontrol
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
To improve performance, most browsers prefetch DNS records for the links in a page. In that way the destination ip is already known when the user clicks on a link. This may lead to over-use of the DNS service (if you own a big website, visited by millions people…), privacy issues (one eavesdropper could infer that you are on a certain page), or page statistics alteration (some links may appear visited even if they are not). If you have high security needs you can disable DNS prefetching, at the cost of a performance penalty.
Per migliorare le prestazioni, la maggior parte dei browser precarica i record DNS per i link in una pagina. In questo modo l'ip di destinazione è già noto quando l'utente fa clic su un link. Questo può portare ad un uso eccessivo del servizio DNS (se possedete un grande sito web, visitato da milioni di persone…), problemi di privacy (un origliatore potrebbe dedurre che sei su una determinata pagina), o un'alterazione delle statistiche di pagina (alcuni link possono apparire visitati anche se non lo sono). Se hai esigenze di sicurezza elevata, è possibile disabilitare il precaricamento DNS, al costo di una perdita di prestazioni.
# --instructions--
Use the `helmet.dnsPrefetchControl()` method on your server.
Usa il metodo `helmet.dnsPrefetchControl()` sul tuo server.
# --hints--
helmet.dnsPrefetchControl() middleware should be mounted correctly
Il middleware helmet.dnsPrefetchControl() deve essere montato correttamente
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 58a25bcff9fc0f352b528e7d
title: Hash and Compare Passwords Asynchronously
title: Crittografare e confrontare le password in modo asincrono
challengeType: 2
forumTopicId: 301578
dashedName: hash-and-compare-passwords-asynchronously
@@ -8,9 +8,9 @@ dashedName: hash-and-compare-passwords-asynchronously
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-bcrypt), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-bcrypt/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-bcrypt), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-bcrypt/).
As hashing is designed to be computationally intensive, it is recommended to do so asynchronously on your server as to avoid blocking incoming connections while you hash. All you have to do to hash a password asynchronous is call
Poiché la crittografia è progettata per essere ad alta intensità computazionale, si consiglia di farlo in modo asincrono sul server per evitare di bloccare le connessioni in entrata mentre si fa l'hash (letteralmente, lo "sminuzzamento") di una password. Tutto quello che devi fare per crittografare una password in modo asincrono è chiamare
```js
bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => {
@@ -20,9 +20,9 @@ bcrypt.hash(myPlaintextPassword, saltRounds, (err, hash) => {
# --instructions--
Add this hashing function to your server(we've already defined the variables used in the function for you to use) and log it to the console for you to see! At this point you would normally save the hash to your database.
Aggiungi questa funzione di hashing al tuo server (abbiamo già definito le variabili usate nella funzione da usare) e scrivila sulla console per visualizzarla! A questo punto normalmente salveresti l'hash (la password crittografata) nel tuo database.
Now when you need to figure out if a new input is the same data as the hash you would just use the compare function.
Adesso, quando hai bisogno di capire se un nuovo ingresso ha gli stessi dati della password crittografata, potrai utilizzare la funzione di confronto.
```js
bcrypt.compare(myPlaintextPassword, hash, (err, res) => {
@@ -30,7 +30,7 @@ bcrypt.compare(myPlaintextPassword, hash, (err, res) => {
});
```
Add this into your existing hash function(since you need to wait for the hash to complete before calling the compare function) after you log the completed hash and log 'res' to the console within the compare. You should see in the console a hash then 'true' is printed! If you change 'myPlaintextPassword' in the compare function to 'someOtherPlaintextPassword' then it should say false.
Aggiungilo alla tua funzione di crittografia esistente (dal momento che devi aspettare che l'hash venga completato prima di chiamare la funzione di confronto) dopo aver scritto l'hash e il log 'res' completati sulla console all'interno del confronto. Dovresti vedere nella console una passwrd crittografata, poi viene stampato 'true'! Se cambi 'myPlaintextPassword' nella funzione di confronto con 'someOtherPlaintextPassword' allora dovrebbe restituire false.
```js
bcrypt.hash('passw0rd!', 13, (err, hash) => {
@@ -43,11 +43,11 @@ bcrypt.hash('passw0rd!', 13, (err, hash) => {
```
Submit your page when you think you've got it right.
Invia la tua pagina quando pensi di averlo fatto correttamente.
# --hints--
Async hash should be generated and correctly compared.
L'hash asincrono dovrebbe essere generato e confrontato correttamente.
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 58a25bcff9fc0f352b528e7e
title: Hash and Compare Passwords Synchronously
title: Crittografare e confrontare le password in modo sincrono
challengeType: 2
forumTopicId: 301579
dashedName: hash-and-compare-passwords-synchronously
@@ -8,31 +8,31 @@ dashedName: hash-and-compare-passwords-synchronously
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-bcrypt), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-bcrypt/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-bcrypt), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-bcrypt/).
Hashing synchronously is just as easy to do but can cause lag if using it server side with a high cost or with hashing done very often. Hashing with this method is as easy as calling
L' hashing sincrono è altrettanto facile da fare, ma può causare ritardo se lo si utilizza dal lato server con un costo elevato o con hashing fatto molto spesso. Crittografare con questo metodo è facile come chiamare
```js
var hash = bcrypt.hashSync(myPlaintextPassword, saltRounds);
```
Add this method of hashing to your code and then log the result to the console. Again, the variables used are already defined in the server so you won't need to adjust them. You may notice even though you are hashing the same password as in the async function, the result in the console is different- this is due to the salt being randomly generated each time as seen by the first 22 characters in the third string of the hash. Now to compare a password input with the new sync hash, you would use the compareSync method:
Aggiungi questo metodo di hashing al tuo codice e poi scrivi il risultato sulla console. Anche in questo caso, le variabili utilizzate sono già definite nel server, quindi non è necessario modificarle. Puoi notare che, anche se stiamo crittografando la stessa password come nella funzione asincrona, il risultato nella console è diverso - questo è dovuto al fatto che il salt viene generato casualmente ogni volta come si vede dai primi 22 caratteri nella terza stringa dell'hash. Ora per confrontare un inserimento di password con il nuovo hash di sincronizzazione, si utilizza il metodo compareSync:
```js
var result = bcrypt.compareSync(myPlaintextPassword, hash);
```
with the result being a boolean true or false.
il cui risultato è un booleano vero o falso.
# --instructions--
Add the function in and log the result to the console to see it working.
Aggiungi la funzione e scrivi il risultato sulla console per vederla funzionare.
Submit your page when you think you've got it right.
Invia la tua pagina quando pensi di averlo fatto correttamente.
# --hints--
Sync hash should be generated and correctly compared.
L'hash asincrono dovrebbe essere generato e confrontato correttamente.
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8247367417b2b2512c37
title: Hide Potentially Dangerous Information Using helmet.hidePoweredBy()
title: Nascondere informazioni potenzialmente pericolose usando helmet.hidePoweredBy()
challengeType: 2
forumTopicId: 301580
dashedName: hide-potentially-dangerous-information-using-helmet-hidepoweredby
@@ -8,13 +8,13 @@ dashedName: hide-potentially-dangerous-information-using-helmet-hidepoweredby
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Hackers can exploit known vulnerabilities in Express/Node if they see that your site is powered by Express. `X-Powered-By: Express` is sent in every request coming from Express by default. Use the `helmet.hidePoweredBy()` middleware to remove the X-Powered-By header.
Gli hacker possono sfruttare le vulnerabilità conosciute in Express/Node se vedono che il tuo sito è alimentato da Express. `X-Powered-By: Express` viene inviato in ogni richiesta proveniente da Express per impostazione predefinita. Usa il middleware `helmet.hidePoweredBy()` per rimuovere l'intestazione X-Powered-By.
# --hints--
helmet.hidePoweredBy() middleware should be mounted correctly
Il middleware helmet.hidePoweredBy() deve essere montato correttamente
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8247367417b2b2512c36
title: Install and Require Helmet
title: Installare e richiedere Helmet
challengeType: 2
forumTopicId: 301581
dashedName: install-and-require-helmet
@@ -8,25 +8,25 @@ dashedName: install-and-require-helmet
# --description--
Working on these challenges will involve you writing your code using one of the following methods:
Lavorare su queste sfide ti porterà a scrivere il tuo codice utilizzando uno dei seguenti metodi:
- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-infosec/) and complete these challenges locally.
- Use [our Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-infosec) to complete these challenges.
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
- Clonare [questo repository GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/) e completare queste sfide localmente.
- Usare [la nostra bozza di progetto su Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec) per completare queste sfide.
- Usare un costruttore di siti a tua scelta per completare il progetto. Assicurati di incorporare tutti i file del nostro repository GitHub.
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field.
Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`.
Helmet helps you secure your Express apps by setting various HTTP headers.
Helmet ti aiuta a proteggere le tue app Express impostando varie intestazioni HTTP.
# --instructions--
All your code for these lessons goes in the `myApp.js` file between the lines of code we have started you off with. Do not change or delete the code we have added for you.
Tutto il tuo codice per queste lezioni va nel file `myApp.js` tra le righe di codice con cui ti abbiamo avviato. Non modificare o eliminare il codice che abbiamo aggiunto per te.
Install Helmet version `3.21.3`, then require it. You can install a specific version of a package with `npm install --save-exact package@version`, or by adding it to your `package.json` directly.
Installa la versione di Helmet `3.21.3`, poi richiedila. È possibile installare una versione specifica di un pacchetto con `npm install --save-exact package@version`, o aggiungendolo al tuo `package.json` direttamente.
# --hints--
`helmet` version `3.21.3` should be in `package.json`
`helmet` versione `3.21.3` dovrebbe essere in `package.json`
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8247367417b2b2512c38
title: Mitigate the Risk of Clickjacking with helmet.frameguard()
title: Mitigare il rischio di Clickjacking con helmet.frameguard()
challengeType: 2
forumTopicId: 301582
dashedName: mitigate-the-risk-of-clickjacking-with-helmet-frameguard
@@ -8,19 +8,19 @@ dashedName: mitigate-the-risk-of-clickjacking-with-helmet-frameguard
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Your page could be put in a `<frame>` or `<iframe>` without your consent. This can result in clickjacking attacks, among other things. Clickjacking is a technique of tricking a user into interacting with a page different from what the user thinks it is. This can be obtained executing your page in a malicious context, by mean of iframing. In that context a hacker can put a hidden layer over your page. Hidden buttons can be used to run bad scripts. This middleware sets the X-Frame-Options header. It restricts who can put your site in a frame. It has three modes: DENY, SAMEORIGIN, and ALLOW-FROM.
La tua pagina potrebbe essere inserita in un `<frame>` o `<iframe>` senza il tuo consenso. Questo tra le altre cose può portare ad attacchi di clickjacking ("dirottamento dei click"). Il clickjacking è una tecnica per indurre un utente a interagire con una pagina diversa da quella che l'utente pensa che sia. Questo può essere ottenuto eseguendo la tua pagina in un contesto dannoso, per mezzo di iframing. In questo contesto un hacker può mettere un livello nascosto sulla tua pagina. I pulsanti nascosti possono essere usati per eseguire script dannosi. Questo middleware imposta l'intestazione X-Frame-Options. Limita chi può mettere il tuo sito in un iframe. Ha tre modalità: DENY, SAMEORIGIN, e ALLOW-FROM.
We dont need our app to be framed.
Non abbiamo bisogno che la nostra app sia in un iframe.
# --instructions--
Use `helmet.frameguard()` passing with the configuration object `{action: 'deny'}`.
Usa `helmet.frameguard()` passando `{action: 'deny'}` con l'oggetto di configurazione.
# --hints--
helmet.frameguard() middleware should be mounted correctly
Il middleware helmet.frameguard() deve essere montato correttamente
```js
(getUserInput) =>
@@ -38,7 +38,7 @@ helmet.frameguard() middleware should be mounted correctly
);
```
helmet.frameguard() 'action' should be set to 'DENY'
helmet.frameguard() 'action' dovrebbe essere impostato su 'DENY'
```js
(getUserInput) =>

View File

@@ -1,7 +1,7 @@
---
id: 587d8247367417b2b2512c39
title: >-
Mitigate the Risk of Cross Site Scripting (XSS) Attacks with helmet.xssFilter()
Mitigare il rischio di attacchi Cross-Site Scripting (XSS) con helmet.xssFilter()
challengeType: 2
forumTopicId: 301583
dashedName: mitigate-the-risk-of-cross-site-scripting-xss-attacks-with-helmet-xssfilter
@@ -9,23 +9,23 @@ dashedName: mitigate-the-risk-of-cross-site-scripting-xss-attacks-with-helmet-xs
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Cross-site scripting (XSS) is a frequent type of attack where malicious scripts are injected into vulnerable pages, with the purpose of stealing sensitive data like session cookies, or passwords.
Il cross-site scripting (XSS) è un tipo di attacco frequente in cui script dannosi vengono iniettati in pagine vulnerabili, con lo scopo di rubare dati sensibili come cookie di sessione, o password.
The basic rule to lower the risk of an XSS attack is simple: “Never trust users input”. As a developer you should always sanitize all the input coming from the outside. This includes data coming from forms, GET query urls, and even from POST bodies. Sanitizing means that you should find and encode the characters that may be dangerous e.g. &lt;, >.
La regola di base per ridurre il rischio di un attacco XSS è semplice: “Non fidarti mai dellinput dellutente”. Come sviluppatore dovresti sempre sanificare tutti gli input provenienti dall'esterno. Questo include i dati provenienti da moduli, URL di query GET e persino dal corpo delle richieste POST. Sanificare significa che si dovrebbe trovare e codificare i caratteri che possono essere pericolosi, ad esempio &lt;, >.
Modern browsers can help mitigating the risk by adopting better software strategies. Often these are configurable via http headers.
I browser moderni possono aiutare a mitigare il rischio adottando strategie software migliori. Spesso sono configurabili tramite intestazioni http.
The X-XSS-Protection HTTP header is a basic protection. The browser detects a potential injected script using a heuristic filter. If the header is enabled, the browser changes the script code, neutralizing it. It still has limited support.
L'intestazione X-XSS-Protection HTTP è una protezione di base. Il browser rileva un potenziale script iniettato utilizzando un filtro euristico. Se l'intestazione è abilitata, il browser cambia il codice di script, neutralizzandolo. Ha ancora un supporto limitato.
# --instructions--
Use `helmet.xssFilter()` to sanitize input sent to your server.
Usa `helmet.xssFilter()` per sanificare l'input inviato al tuo server.
# --hints--
helmet.xssFilter() middleware should be mounted correctly
Il middleware helmet.xssFilter() deve essere montato correttamente
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8248367417b2b2512c3b
title: Prevent IE from Opening Untrusted HTML with helmet.ieNoOpen()
title: Impedire a IE di aprire HTML non attendibile con helmet.ieNoOpen()
challengeType: 2
forumTopicId: 301584
dashedName: prevent-ie-from-opening-untrusted-html-with-helmet-ienoopen
@@ -8,17 +8,17 @@ dashedName: prevent-ie-from-opening-untrusted-html-with-helmet-ienoopen
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Some web applications will serve untrusted HTML for download. Some versions of Internet Explorer by default open those HTML files in the context of your site. This means that an untrusted HTML page could start doing bad things in the context of your pages. This middleware sets the X-Download-Options header to noopen. This will prevent IE users from executing downloads in the trusted sites context.
Alcune applicazioni web serviranno HTML non attendibile per il download. Alcune versioni di Internet Explorer per impostazione predefinita aprono quei file HTML nel contesto del tuo sito. Ciò significa che una pagina HTML non attendibile potrebbe iniziare a fare cose sbagliate nel contesto delle tue pagine. Questo middleware imposta l'intestazione delle Opzioni di X-D a noopen. Questo impedirà agli utenti di IE di eseguire i download nel contesto del sito affidabile.
# --instructions--
Use the `helmet.ieNoOpen()` method on your server.
Usa il metodo `helmet.ieNoOpen()` sul tuo server.
# --hints--
helmet.ieNoOpen() middleware should be mounted correctly
Il middleware helmet.ieNoOpen() deve essere montato correttamente
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d8249367417b2b2512c3f
title: Set a Content Security Policy with helmet.contentSecurityPolicy()
title: Impostare una politica di sicurezza dei contenuti con helmet.contentSecurityPolicy()
challengeType: 2
forumTopicId: 301585
dashedName: set-a-content-security-policy-with-helmet-contentsecuritypolicy
@@ -8,21 +8,21 @@ dashedName: set-a-content-security-policy-with-helmet-contentsecuritypolicy
# --description--
As a reminder, this project is being built upon the following starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
Come promemoria, questo progetto verrà costruito a partire dalla seguente bozza su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-infosec), o clonato da [GitHub](https://github.com/freeCodeCamp/boilerplate-infosec/).
This challenge highlights one promising new defense that can significantly reduce the risk and impact of many type of attacks in modern browsers. By setting and configuring a Content Security Policy you can prevent the injection of anything unintended into your page. This will protect your app from XSS vulnerabilities, undesired tracking, malicious frames, and much more. CSP works by defining an allowed list of content sources which are trusted. You can configure them for each kind of resource a web page may need (scripts, stylesheets, fonts, frames, media, and so on…). There are multiple directives available, so a website owner can have a granular control. See HTML 5 Rocks, KeyCDN for more details. Unfortunately CSP is unsupported by older browser.
Questa sfida mette in evidenza una promettente nuova difesa che può ridurre significativamente il rischio e l'impatto di molti tipi di attacchi nei browser moderni. Impostando e configurando una Content Security Policy (CSP - Politica di Sicurezza dei Contenuti) puoi impedire l'iniezione di cose indesiderate nella tua pagina. Questo proteggerà la tua app da vulnerabilità XSS, tracciamento indesiderato, frame dannosi e molto altro ancora. La CSP funziona definendo un elenco di sorgenti di contenuto attendibili. Puoi configurarlo per ogni tipo di risorsa di cui una pagina web potrebbe aver bisogno (script, fogli di stile, stili di caratteri, frame, media così via…). Ci sono più direttive disponibili, quindi il proprietario di un sito web può avere un controllo granulare. Vedi HTML 5 Rocks, KeyCDN per maggiori dettagli. Purtroppo CSP non è supportata dai vecchi browser.
By default, directives are wide open, so its important to set the defaultSrc directive as a fallback. Helmet supports both defaultSrc and default-src naming styles. The fallback applies for most of the unspecified directives.
Per impostazione predefinita, le direttive sono largamente aperte, quindi è importante impostare la direttiva defaultSrc come ripiego. Helmet supporta sia lo stile di denominazione defaultSrc che default-src. La direttiva di riserva si applica alla maggior parte delle direttive non specificate.
# --instructions--
In this exercise, use `helmet.contentSecurityPolicy()`. Configure it by adding a `directives` object. In the object, set the `defaultSrc` to `["'self'"]` (the list of allowed sources must be in an array), in order to trust only your website address by default. Also set the `scriptSrc` directive so that you only allow scripts to be downloaded from your website (`'self'`), and from the domain `'trusted-cdn.com'`.
In questo esercizio, utilizza `helmet.contentSecurityPolicy()`. Configuralo aggiungendo un oggetto `directives`. Nell'oggetto, imposta `defaultSrc` a `["'self'"]` (la lista delle sorgenti consentite deve essere in un array), in modo da fidarsi solo dell'indirizzo del tuo sito web per impostazione predefinita. Imposta anche la direttiva `scriptSrc` in modo da consentire che gli script siano scaricati solo dal tuo sito web (`'self'`), e dal dominio `'trusted-cdn.com'`.
Hint: in the `'self'` keyword, the single quotes are part of the keyword itself, so it needs to be enclosed in double quotes to be working.
Suggerimento: nella parola chiave `'self'`, le virgolette singole fanno parte della parola chiave stessa, quindi deve essere racchiuso in doppie virgolette per funzionare.
# --hints--
helmet.contentSecurityPolicy() middleware should be mounted correctly
Il middleware helmet.contentSecurityPolicy() deve essere montato correttamente
```js
(getUserInput) =>
@@ -36,7 +36,7 @@ helmet.contentSecurityPolicy() middleware should be mounted correctly
);
```
Your csp config is not correct. defaultSrc should be ["'self'"] and scriptSrc should be ["'self'", 'trusted-cdn.com']
La configurazione csp non è corretta. defaultSrc dovrebbe essere ["'self'"] e scriptSrc dovrebbe essere ["'self'", 'trusted-cdn.com']
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 58a25bcef9fc0f352b528e7c
title: Understand BCrypt Hashes
title: Capire la crittografia hash BCrypt
challengeType: 2
forumTopicId: 301586
dashedName: understand-bcrypt-hashes
@@ -8,23 +8,23 @@ dashedName: understand-bcrypt-hashes
# --description--
For the following challenges, you will be working with a new starter project that is different from the previous one. You can find the new starter project on [Replit](https://replit.com/github/freeCodeCamp/boilerplate-bcrypt), or clone it from [GitHub](https://github.com/freeCodeCamp/boilerplate-bcrypt/).
Per le seguenti sfide, lavorerai con una nuova bozza di progetto che è diversa da quella precedente. Puoi trovare la nuova bozza di progetto su [Replit](https://replit.com/github/freeCodeCamp/boilerplate-bcrypt), o clonarla da [GitHub](https://github.com/freeCodeCamp/boilerplate-bcrypt/).
BCrypt hashes are very secure. A hash is basically a fingerprint of the original data- always unique. This is accomplished by feeding the original data into an algorithm and returning a fixed length result. To further complicate this process and make it more secure, you can also *salt* your hash. Salting your hash involves adding random data to the original data before the hashing process which makes it even harder to crack the hash.
Gli hash BCrypt sono molto sicuri. Un hash è fondamentalmente un'impronta digitale dei dati originali, sempre unica. Questo si ottiene inserendo i dati originali in un algoritmo e restituendo un risultato di lunghezza fissa. Per complicare ulteriormente questo processo e renderlo più sicuro, puoi anche aggiungere un *salt* al tuo hash. Aggiungere un salt al tuo hash comporta l'aggiunta di dati casuali ai dati originali prima del processo di hashing che rende ancora più difficile crackare l'hash.
BCrypt hashes will always looks like `$2a$13$ZyprE5MRw2Q3WpNOGZWGbeG7ADUre1Q8QO.uUUtcbqloU0yvzavOm` which does have a structure. The first small bit of data `$2a` is defining what kind of hash algorithm was used. The next portion `$13` defines the *cost*. Cost is about how much power it takes to compute the hash. It is on a logarithmic scale of 2^cost and determines how many times the data is put through the hashing algorithm. For example, at a cost of 10 you are able to hash 10 passwords a second on an average computer, however at a cost of 15 it takes 3 seconds per hash... and to take it further, at a cost of 31 it would takes multiple days to complete a hash. A cost of 12 is considered very secure at this time. The last portion of your hash `$ZyprE5MRw2Q3WpNOGZWGbeG7ADUre1Q8QO.uUUtcbqloU0yvzavOm`, looks like one large string of numbers, periods, and letters but it is actually two separate pieces of information. The first 22 characters is the salt in plain text, and the rest is the hashed password!
Gli hash BCrypt appariranno sempre come `$2a$13$ZyprE5MRw2Q3WpNOGZWGbeG7ADUre1Q8QO.uUUtcbqloU0yvzavOm` che ha una struttura. Il primo pezzettino di dati `$2a` sta definendo che tipo di algoritmo di hash è stato utilizzato. La porzione successiva `$13` definisce il *costo*. Il costo è più o meno quanto potere computazionale è necessario per calcolare l'hash. È su una scala logaritmica di 2^costo e determina quante volte i dati vengono messi attraverso l'algoritmo di hashing. Ad esempio, al costo di 10 sei in grado di crittografare 10 password al secondo su un computer medio, tuttavia al costo di 15 ci vogliono 3 secondi per hash... e per andare oltre, ad un costo di 31 ci vorrebbero più giorni per completare un hash. Un costo di 12 è considerato molto sicuro in questo momento. L'ultima porzione del tuo hash `$ZyprE5MRw2Q3WpNOGZWGbeG7ADUre1Q8QO.uUUtcbqloU0yvzavOm`, sembra una grande stringa di numeri, punti e lettere, ma sono in realtà due pezzi separati di informazioni. I primi 22 caratteri sono il salt in chiaro, e il resto è la password crittografata!
# --instructions--
To begin using BCrypt, add it as a dependency in your project and require it as 'bcrypt' in your server.
Per iniziare a usare BCrypt, aggiungilo come dipendenza nel tuo progetto e richiederlo come 'bcrypt' nel tuo server.
Add all your code for these lessons in the `server.js` file between the code we have started you off with. Do not change or delete the code we have added for you.
Aggiungi tutto il tuo codice per queste lezioni nel file `server.js` in mezzo al codice con cui ti abbiamo avviato. Non modificare o eliminare il codice che abbiamo aggiunto per te.
Submit your page when you think you've got it right.
Invia la tua pagina quando pensi di averlo fatto correttamente.
# --hints--
BCrypt should be a dependency.
BCrypt dovrebbe essere una dipendenza.
```js
(getUserInput) =>
@@ -43,7 +43,7 @@ BCrypt should be a dependency.
);
```
BCrypt should be properly required.
BCrypt dovrebbe essere richiesto correttamente.
```js
(getUserInput) =>