feat(curriculum): restore seed + solution to Chinese (#40683)

* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
This commit is contained in:
Oliver Eyton-Williams
2021-01-13 03:31:00 +01:00
committed by GitHub
parent 0095583028
commit ee1e8abd87
4163 changed files with 57505 additions and 10540 deletions

View File

@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3c
title: Ask Browsers to Access Your Site via HTTPS Only with helmet.hsts()
challengeType: 2
forumTopicId: 301573
dashedName: ask-browsers-to-access-your-site-via-https-only-with-helmet-hsts
---
# --description--
@ -51,8 +52,6 @@ maxAge should be equal to 7776000 s (90 days)
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3a
title: Avoid Inferring the Response MIME Type with helmet.noSniff()
challengeType: 2
forumTopicId: 301574
dashedName: avoid-inferring-the-response-mime-type-with-helmet-nosniff
---
# --description--
@ -30,8 +31,6 @@ helmet.noSniff() middleware should be mounted correctly
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c40
title: Configure Helmet Using the parent helmet() Middleware
challengeType: 2
forumTopicId: 301575
dashedName: configure-helmet-using-the-parent-helmet-middleware
---
# --description--
@ -38,8 +39,6 @@ no tests - it's a descriptive challenge
assert(true);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c3e
title: Disable Client-Side Caching with helmet.noCache()
challengeType: 2
forumTopicId: 301576
dashedName: disable-client-side-caching-with-helmet-nocache
---
# --description--
@ -35,8 +36,6 @@ helmet.noCache() middleware should be mounted correctly
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3d
title: Disable DNS Prefetching with helmet.dnsPrefetchControl()
challengeType: 2
forumTopicId: 301577
dashedName: disable-dns-prefetching-with-helmet-dnsprefetchcontrol
---
# --description--
@ -32,8 +33,6 @@ helmet.dnsPrefetchControl() middleware should be mounted correctly
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 58a25bcff9fc0f352b528e7d
title: Hash and Compare Passwords Asynchronously
challengeType: 2
forumTopicId: 301578
dashedName: hash-and-compare-passwords-asynchronously
---
# --description--
@ -69,8 +70,6 @@ Async hash should be generated and correctly compared.
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 58a25bcff9fc0f352b528e7e
title: Hash and Compare Passwords Synchronously
challengeType: 2
forumTopicId: 301579
dashedName: hash-and-compare-passwords-synchronously
---
# --description--
@ -54,8 +55,6 @@ Sync hash should be generated and correctly compared.
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c37
title: Hide Potentially Dangerous Information Using helmet.hidePoweredBy()
challengeType: 2
forumTopicId: 301580
dashedName: hide-potentially-dangerous-information-using-helmet-hidepoweredby
---
# --description--
@ -28,8 +29,6 @@ helmet.hidePoweredBy() middleware should be mounted correctly
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c36
title: Install and Require Helmet
challengeType: 2
forumTopicId: 301581
dashedName: install-and-require-helmet
---
# --description--
@ -34,8 +35,6 @@ Install Helmet version `3.21.3`, then require it.
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c38
title: Mitigate the Risk of Clickjacking with helmet.frameguard()
challengeType: 2
forumTopicId: 301582
dashedName: mitigate-the-risk-of-clickjacking-with-helmet-frameguard
---
# --description--
@ -52,8 +53,6 @@ helmet.frameguard() 'action' should be set to 'DENY'
);
```
# --seed--
# --solutions--
```js

View File

@ -5,6 +5,7 @@ title: >-
helmet.xssFilter()
challengeType: 2
forumTopicId: 301583
dashedName: mitigate-the-risk-of-cross-site-scripting-xss-attacks-with-helmet-xssfilter
---
# --description--
@ -40,8 +41,6 @@ helmet.xssFilter() middleware should be mounted correctly
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3b
title: Prevent IE from Opening Untrusted HTML with helmet.ieNoOpen()
challengeType: 2
forumTopicId: 301584
dashedName: prevent-ie-from-opening-untrusted-html-with-helmet-ienoopen
---
# --description--
@ -32,8 +33,6 @@ helmet.ieNoOpen() middleware should be mounted correctly
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c3f
title: Set a Content Security Policy with helmet.contentSecurityPolicy()
challengeType: 2
forumTopicId: 301585
dashedName: set-a-content-security-policy-with-helmet-contentsecuritypolicy
---
# --description--
@ -59,8 +60,6 @@ Your csp config is not correct. defaultSrc should be ["'self'"] and scriptSrc sh
);
```
# --seed--
# --solutions--
```js

View File

@ -3,6 +3,7 @@ id: 58a25bcef9fc0f352b528e7c
title: Understand BCrypt Hashes
challengeType: 2
forumTopicId: 301586
dashedName: understand-bcrypt-hashes
---
# --description--
@ -60,8 +61,6 @@ BCrypt should be properly required.
);
```
# --seed--
# --solutions--
```js