Skip to content

Comments

add solution to spec explicitly#199

Merged
ColdHeat merged 2 commits intoCTFd:solutions-writeupfrom
MilyMilo:solutions-writeup
Feb 19, 2026
Merged

add solution to spec explicitly#199
ColdHeat merged 2 commits intoCTFd:solutions-writeupfrom
MilyMilo:solutions-writeup

Conversation

@MilyMilo
Copy link
Contributor

@MilyMilo MilyMilo commented Feb 12, 2026

This builds on #198 by adding solution to the challenge spec.

Solution can either be a string (path to the file), or an object specifying path, as well as state (or visibility, both work - ctfd uses state, but i feel visibility is more user friendly). It will upload images as before, and render snippets. HTML style image includes are ignored on purpose - but that can be changed.

Also correctly syncs the solutions with a patch instead of a post.

Closes: #198

Copy link
Member

@ColdHeat ColdHeat left a comment

Choose a reason for hiding this comment

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

The code as well should prioritize state as the main field and visibility as an alias

Comment on lines 56 to 58
# path: writeup/WRITEUP.md
# visibility: solved # hidden | visible | solved
solution: writeup/WRITEUP.md
Copy link
Member

Choose a reason for hiding this comment

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

We should prioritize state over visibility. The name is a bit incorrect but state is also used for challenges. We have to reasonably map to the models imo.

@MilyMilo MilyMilo requested a review from ColdHeat February 19, 2026 07:05
@ColdHeat ColdHeat merged commit fe3a7d9 into CTFd:solutions-writeup Feb 19, 2026
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