CTFd / CTFd/CTFd

Flag compare should return more than just a boolean

Open
#1,877 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.8k
Forks
2.8k
Avg merge
1d 6h
Merged PRs (30d)
5

Description

I think an enum could potentially allow for better messages. For example if we returned something like

FlagStatus.DUPLICATE

A plugin could say something like you've already submitted this exact flag

Currently we just say correct/incorrect. I don't think this behavior necessarily needs to change but the ability to change it in a plugin would be nice.

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is identified in the issue. Start by locating the flag comparison behavior and its plugin interface, then determine how a status such as DUPLICATE could be exposed without changing the current correct/incorrect behavior; done means plugins can produce more specific messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.