From 20f05c7dccfd9574a89e83fd1e2180101689d549 Mon Sep 17 00:00:00 2001 From: Bjoern Kimminich Date: Mon, 8 Mar 2021 09:47:43 +0100 Subject: [PATCH] Make code snippet visibility configurable --- config.schema.yml | 2 ++ config/ctf.yml | 1 + config/default.yml | 1 + config/fbctf.yml | 1 + config/mozilla.yml | 1 + frontend/src/app/Services/configuration.service.ts | 1 + frontend/src/app/score-board/score-board.component.html | 2 +- frontend/src/app/score-board/score-board.component.ts | 2 ++ 8 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config.schema.yml b/config.schema.yml index c778d2dda25..c993467435f 100644 --- a/config.schema.yml +++ b/config.schema.yml @@ -114,6 +114,8 @@ challenges: type: boolean showMitigations: type: boolean + showCodeSnippets: + type: string restrictToTutorialsFirst: type: boolean overwriteUrlForProductTamperingChallenge: diff --git a/config/ctf.yml b/config/ctf.yml index 673c4f8b40e..8e95e64a377 100644 --- a/config/ctf.yml +++ b/config/ctf.yml @@ -8,6 +8,7 @@ application: showOnFirstStart: false challenges: showHints: false + showCodeSnippets: solved safetyOverride: true hackingInstructor: isEnabled: false diff --git a/config/default.yml b/config/default.yml index f6b0d5a65b5..68e20253ab1 100644 --- a/config/default.yml +++ b/config/default.yml @@ -75,6 +75,7 @@ challenges: showSolvedNotifications: true showHints: true showMitigations: true + showCodeSnippets: always # Options: never solved always restrictToTutorialsFirst: false overwriteUrlForProductTamperingChallenge: 'https://owasp.slack.com' xssBonusPayload: '' diff --git a/config/fbctf.yml b/config/fbctf.yml index 427a92cc279..1c2dfce466b 100644 --- a/config/fbctf.yml +++ b/config/fbctf.yml @@ -8,6 +8,7 @@ application: showOnFirstStart: false challenges: showHints: false + showCodeSnippets: solved hackingInstructor: isEnabled: false ctf: diff --git a/config/mozilla.yml b/config/mozilla.yml index 88167421302..6b51ae0fb2f 100644 --- a/config/mozilla.yml +++ b/config/mozilla.yml @@ -38,6 +38,7 @@ application: encryption: ~ challenges: showHints: false + showCodeSnippets: never xssBonusPayload: '' hackingInstructor: isEnabled: false diff --git a/frontend/src/app/Services/configuration.service.ts b/frontend/src/app/Services/configuration.service.ts index 170f515d094..1a22283b620 100644 --- a/frontend/src/app/Services/configuration.service.ts +++ b/frontend/src/app/Services/configuration.service.ts @@ -77,6 +77,7 @@ interface Config { showSolvedNotifications: boolean showHints: boolean showMitigations: boolean + showCodeSnippets: string restrictToTutorialsFirst: boolean safetyOverride: boolean overwriteUrlForProductTamperingChallenge: string diff --git a/frontend/src/app/score-board/score-board.component.html b/frontend/src/app/score-board/score-board.component.html index 5bee1e16e64..b3dd47bcf7f 100644 --- a/frontend/src/app/score-board/score-board.component.html +++ b/frontend/src/app/score-board/score-board.component.html @@ -178,7 +178,7 @@