Skip to content

Conversation

@fuyu0425
Copy link
Contributor

Hello CTFd team,
ctfcli does not load attribution field from yml files.
Here is the patch to add it.

@ColdHeat
Copy link
Member

This looks like the right idea but it looks like you're faling some tests.

The upload issue is related to the deprecation of a Github action will I will tackle

@fuyu0425
Copy link
Contributor Author

I have modified and added related tests.

challenge[key] = challenge_data[key]

challenge["description"] = challenge_data["description"].strip().replace("\r\n", "\n").replace("\t", "")
challenge["attribution"] = challenge_data["attribution"].strip().replace("\r\n", "\n").replace("\t", "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this behave if the server doesn't have the attribution field? I feel like it would error when trying to access the attribution field.

@ColdHeat ColdHeat merged commit 763c2de into CTFd:master Nov 26, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants