-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.0a1 #1523
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Experimental ideas to make SQLAlchemy queries faster by switching them to SQLAlchemy Core * Starts work on #1402
* Use a session invalidation strategy inspired by Django. https://docs.djangoproject.com/en/3.0/topics/auth/default/#session-invalidation-on-password-change * Closes #1430
* Update Flask-Migrate to 2.5.3 * Regenerate the `env.py` file for migrations and delete useless README file * Supercedes #1447
* Added github actions workflow
* Switch from mistune to cmarkgfm * Starts work on #1317 * Update markdown test to be commonmark compliant
* Remove Python 2 specific code * Require imports to have a proper isort-supported order * Only test/lint on Python 3 * Bump most dependencies to latest supported version
* Switch Dockerfile from alpine to debian. Switch entrypoint from sh to bash * Closes #1215
* Replace user facing pagination with Flask SQLAlchemy Pagination objects * Closes #1353 I think this is a big improvement but I feel like this is harder to create a theme construct around.
Start cleaning up a lot of the core theme. Extract pieces into components that can be included into overarching templates. Work on #1234
* Closes #1362 * Reduces the session object to just an id, nonce, and security hash
* Require that markdown files are linted by prettier
* Adds User and Team globals to Jinja theme files. * Closes #1234
* Paginate only the `/api/v1/users`, `/api/v1/teams`, and `/api/v1/submissions` endpoints. * Add a `PaginatedAPIListSuccessResponse` class with a customized `apidoc` method to hack in the pagination scheme * Works on #1318
* Works on #1318 * Adds searching and filtering to most of the bulk API endpoints * Adds documentation on the GET parameters used to conduct searches
) * Adds support for looking up countries by IP address. * Shows country and flag for a user/team's IP addresses in the admin panel * Adds support for `GEOIP_DATABASE_PATH` in config.py * Closes #1115
* Change `/api/v1/config/<config_key>` to return properly structured data * Closes #1506
* Add account searching to the user facing side of CTFd * Closes #1354
* Lint `Dockerfile` and `docker-compose.yml` * Closes #1458
* Allows for configuration to be specified via `config.ini` instead of direct Python manipulation * Adds type hints to `config.py` to make it clearer what each variable expects
Codecov Report
@@ Coverage Diff @@
## master #1523 +/- ##
==========================================
+ Coverage 89.05% 89.25% +0.20%
==========================================
Files 105 129 +24
Lines 5692 6554 +862
==========================================
+ Hits 5069 5850 +781
- Misses 623 704 +81
Continue to review full report at Codecov.
|
* Cache accesses of `User.place` and `User.score` in the user attrs wrapper via Jinja
UnknownSilicon
pushed a commit
to UnknownSilicon/CTFd
that referenced
this pull request
Oct 4, 2023
Alpha release of CTFd v3. # 3.0.0a1 / 2020-07-01 **General** - CTFd is now Python 3 only - Render markdown with the CommonMark spec provided by `cmarkgfm` - Render markdown stripped of any malicious JavaScript or HTML. - This is a significant change from previous versions of CTFd where any HTML content from an admin was considered safe. - Inject `Config`, `User`, `Team`, `Session`, and `Plugin` globals into Jinja - User sessions no longer store any user-specific attributes. - Sessions only store the user's ID, CSRF nonce, and an hmac of the user's password - This allows for session invalidation on password changes - The user facing side of CTFd now has user and team searching - GeoIP support now available for converting IP addresses to guessed countries **Admin Panel** - Use EasyMDE as an improved description/text editor for Markdown enabled fields. - Media Library button now integrated into EasyMDE enabled fields - VueJS now used as the underlying implementation for the Media Library - Fix setting theme color in Admin Panel - Green outline border has been removed from the Admin Panel **API** - Significant overhauls in API documentation provided by Swagger UI and Swagger json - Make almost all API endpoints provide filtering and searching capabilities - Change `GET /api/v1/config/<config_key>` to return structured data according to ConfigSchema **Themes** - Themes now have access to the `Configs` global which provides wrapped access to `get_config`. - For example, `{{ Configs.ctf_name }}` instead of `get_ctf_name()` or `get_config('ctf_name')` - Themes must now specify a `challenge.html` which control how a challenge should look. - The main library for charts has been changed from Plotly to Apache ECharts. - Forms have been moved into wtforms for easier form rendering inside of Jinja. - From Jinja you can access forms via the Forms global i.e. `{{ Forms }}` - This allows theme developers to more easily re-use a form without having to copy-paste HTML. - Themes can now provide a theme settings JSON blob which can be injected into the theme with `{{ Configs.theme_settings }}` - Core theme now includes the challenge ID in location hash identifiers to always refer the right challenge despite duplicate names **Plugins** - Challenge plugins have changed in structure to better allow integration with themes and prevent obtrusive Javascript/XSS. - Challenge rendering now uses `challenge.html` from the provided theme. - Accessing the challenge view content is now provided by `/api/v1/challenges/<challenge_id>` in the `view` section. This allows for HTML to be properly sanitized and rendered by the server allowing CTFd to remove client side Jinja rendering. - `challenge.html` now specifies what's required and what's rendered by the theme. This allows the challenge plugin to avoid having to deal with aspects of the challenge besides the description and input. - A more complete migration guide will be provided when CTFd v3 leaves beta - Display current attempt count in challenge view when max attempts is enabled - `get_standings()`, `get_team_stanadings()`, `get_user_standings()` now has a fields keyword argument that allows for specificying additional fields that SQLAlchemy should return when building the response set. - Useful for gathering additional data when building scoreboard pages - Flags can now control the message that is shown to the user by raising `FlagException` - Fix `override_template()` functionality **Deployment** - Enable SQLAlchemy's `pool_pre_ping` by default to reduce the likelihood of database connection issues - Mailgun email settings are now deprecated. Admins should move to SMTP email settings instead. - Postgres is now considered a second class citizen in CTFd. It is tested against but not a main database backend. If you use Postgres, you are entirely on your own with regards to supporting CTFd. - Docker image now uses Debian instead of Alpine. See CTFd#1215 for rationale. - `docker-compose.yml` now uses a non-root user to connect to MySQL/MariaDB - `config.py` should no longer be editting for configuration, instead edit `config.ini` or the environment variables in `docker-compose.yml`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alpha release of CTFd v3.
3.0.0a1 / 2020-07-01
General
cmarkgfm
Config
,User
,Team
,Session
, andPlugin
globals into JinjaAdmin Panel
API
GET /api/v1/config/<config_key>
to return structured data according to ConfigSchemaThemes
Configs
global which provides wrapped access toget_config
.{{ Configs.ctf_name }}
instead ofget_ctf_name()
orget_config('ctf_name')
challenge.html
which control how a challenge should look.{{ Forms }}
{{ Configs.theme_settings }}
Plugins
challenge.html
from the provided theme./api/v1/challenges/<challenge_id>
in theview
section. This allows for HTML to be properly sanitized and rendered by the server allowing CTFd to remove client side Jinja rendering.challenge.html
now specifies what's required and what's rendered by the theme. This allows the challenge plugin to avoid having to deal with aspects of the challenge besides the description and input.get_standings()
,get_team_stanadings()
,get_user_standings()
now has a fields keyword argument that allows for specificying additional fields that SQLAlchemy should return when building the response set.FlagException
override_template()
functionalityDeployment
pool_pre_ping
by default to reduce the likelihood of database connection issuesdocker-compose.yml
now uses a non-root user to connect to MySQL/MariaDBconfig.py
should no longer be editting for configuration, instead editconfig.ini
or the environment variables indocker-compose.yml