Skip to content

Commit f5915c6

Browse files
committed
Safely access attribution in _normalize_challenge()
1 parent d3562ab commit f5915c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ctfcli/core/challenge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def _normalize_challenge(self, challenge_data: Dict[str, Any]):
466466
challenge[key] = challenge_data[key]
467467

468468
challenge["description"] = challenge_data["description"].strip().replace("\r\n", "\n").replace("\t", "")
469-
challenge["attribution"] = challenge_data["attribution"].strip().replace("\r\n", "\n").replace("\t", "")
469+
challenge["attribution"] = challenge_data.get("attribution", "").strip().replace("\r\n", "\n").replace("\t", "")
470470
challenge["attempts"] = challenge_data["max_attempts"]
471471

472472
for key in ["initial", "decay", "minimum"]:

0 commit comments

Comments
 (0)