File tree 1 file changed +6
-2
lines changed
src/main/java/org/owasp/wrongsecrets/challenges
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,19 @@ public String getChallenges() {
53
53
jsonChallenge .put ("name" , definition .name ().name ());
54
54
jsonChallenge .put ("key" , definition .name ().shortName ());
55
55
jsonChallenge .put ("category" , getCategory () + " - " + definition .category ().category ());
56
+ String disabledChallenge = "This challenge is disbled" ;
56
57
jsonChallenge .put (
57
58
"description" ,
58
59
definition
59
60
.source (runtimeEnvironment )
60
61
.map (s -> s .explanation ().contents ().get ())
61
- .orElse (null ));
62
+ .orElse (disabledChallenge ));
62
63
jsonChallenge .put (
63
64
"hint" ,
64
- definition .source (runtimeEnvironment ).map (s -> s .hint ().contents ().get ()).orElse (null ));
65
+ definition
66
+ .source (runtimeEnvironment )
67
+ .map (s -> s .hint ().contents ().get ())
68
+ .orElse (disabledChallenge ));
65
69
jsonChallenge .put ("solved" , scoreCard .getChallengeCompleted (definition ));
66
70
jsonChallenge .put ("disabledEnv" , getDisabledEnv (definition ));
67
71
jsonChallenge .put ("difficulty" , definition .difficulty ().difficulty ());
You can’t perform that action at this time.
0 commit comments