Skip to content

Commit 997e228

Browse files
committed
Add support for hint titles released in CTFd 3.7.7
1 parent 61c03f0 commit 997e228

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ctfcli/core/challenge.py

+2
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,14 @@ def _create_hints(self):
398398
if type(hint) == str:
399399
hint_payload = {
400400
"content": hint,
401+
"title": "",
401402
"cost": 0,
402403
"challenge_id": self.challenge_id,
403404
}
404405
else:
405406
hint_payload = {
406407
"content": hint["content"],
408+
"title": hint.get("title", ""),
407409
"cost": hint["cost"],
408410
"challenge_id": self.challenge_id,
409411
}

ctfcli/spec/challenge-example.yml

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ hints:
107107
cost: 10
108108
}
109109
- This hint is free
110+
- title: Titled Hint
111+
content: This hint has a title and costs points
112+
cost: 10
110113

111114
# Requirements are used to make a challenge require another challenge to be
112115
# solved before being available.

0 commit comments

Comments
 (0)