Commit Graph

1133 Commits

Author SHA1 Message Date
Kevin Chung
4369272c49 Fix issue where hint with a free requirement could not be unlocked (#2107)
* Fix issue where hint with a free requirement could not be unlocked

* Fix issue with referring to the right hint id
2022-05-03 04:37:03 -04:00
Kevin Chung
f3e43d97a6 Null out some functions in view.js (#2105)
* Remove some unused functions from the default provided standard & dynamic challenge `view.js` files
2022-04-30 22:05:16 -04:00
Miłosz Skaza
073d4b7cf9 backport core theme for comp with core-beta in plugins (#2103) (#2104)
Closes: #2103
2022-04-29 00:17:12 -04:00
Kevin Chung
b9b7de77bd Fix lints in Dockerfile (#2097)
* Fix lints in Dockerfile
2022-04-20 15:55:13 -04:00
Kevin Chung
2702d83975 Bump Python to 3.9 (#2096)
* Bump Python to 3.9
* Closes #2080
2022-04-20 15:32:26 -04:00
Kevin Chung
f01e2d9a40 Fix some ideas from import testing (#2093)
* Add some local changes that didn't make it into the previous PR
* Works on #2087
2022-04-20 05:13:48 -04:00
Kevin Chung
fce5ee418b Add meta and count field to teams awards endpoints (#2095)
* Add meta and count field to `/api/v1/teams/[team_id]/awards` and `/api/v1/teams/me/awards`
2022-04-20 04:21:25 -04:00
Kevin Chung
a626d4b4bf Add changelog for 3.5.0 (#2094)
* Add draft CHANGELOG for 3.5.0
2022-04-19 16:42:44 -04:00
Kevin Chung
9ac0bbba6c Fix issues with backup importing (#2092)
* Closes #2087 
* Use `python manage.py import_ctf` instead of a new Process to import backups from the Admin Panel. 
    * This avoids a number of issues with gevent and webserver forking/threading models. 
* Add `--delete_import_on_finish` to `python manage.py import_ctf`
* Fix issue where `field_entries` table could not be imported when moving between MySQL and MariaDB
2022-04-17 18:28:30 -04:00
Kevin Chung
90e81d7298 Fix page preview so that it accounts for the provided format (#2091)
* Fix page preview so that it accounts for the provided format
* Closes #2089
2022-04-15 15:17:33 -04:00
Kevin Chung
4efccfc39f Disable caching of get_asset_json if debug mode (#2090)
* Disable caching of get_asset_json if debug mode
2022-04-13 18:44:57 -04:00
Isaac
ab4dd902c4 Docker-compose now always uses stable nginx (#2088)
Fixes #2086
2022-04-12 17:50:58 -04:00
Kevin Chung
afc55bff75 Add next recommended challenge after solve (#2081)
* Add a next challenge recommendation to challenges
* Closes #1668
2022-04-08 23:02:56 -04:00
Kevin Chung
c95591aa16 Speed improvements (#2084)
* Improve speed of `/api/v1/teams/me/fails`
* Improve speed of `/api/v1/teams/[team_id]/fails`
* Improve speed of `/api/v1/users/me/fails`
* Improve speed of `/api/v1/users/[user_id]/fails`
2022-04-08 21:21:42 -04:00
Khiem Doan
281ae12a7c Slim down the size of docker image (#2032)
`python3-dev` is already included in `python:3.7-slim-buster`. So we don't need to install it again.
This helps us reduce more than 100MB.
2022-04-08 18:34:53 -04:00
Kevin Chung
f24f2a18bb Import backup improvements (#2078)
* Add progress tracking to import_ctf
* Make imports happen in the background so that we can see status
* Add GET /admin/import to see status of import
* Disable the public interface during imports
* Closes #1980
2022-04-08 16:52:04 -04:00
Kevin Chung
0c6e28315c Add userName and userEmail to init objects in base.html (#2082)
* Add `userName` and `userEmail` to the CTFd init object in `base.html`
* Closes #2066
2022-04-08 15:14:57 -04:00
PinkDraconian
e526d60a6d Remove double printing of log (#2033)
* Fix double logging in log() function 

Co-authored-by: Kevin Chung <kchung@ctfd.io>
2022-04-05 17:08:48 -04:00
Kevin Chung
24bf5302c4 Add support for only viewing hints after unlocking another hint (#2074)
* Add support for only viewing hints after unlocking another hint
* Closes #2007
2022-04-04 23:17:01 -04:00
Kevin Chung
eb8461cf2f Add code to support integration with a Vite build system for JS/CSS (#2051)
* Adds the `Assets` constant to access front end assets from Jinja templates
* Adds a `views.themes_beta` route to avoid the `.dev`/`.min` extension being added automatically to frontend asset urls
* Add `count` meta field to `/api/v1/users/me/solves`, `/api/v1/users/me/fails`, `/api/v1/users/me/awards`, `/api/v1/users/[user_id]/solves`, `/api/v1/users/[user_id]/fails`, `/api/v1/users/[user_id]/awards`

* Works on #2049
2022-04-04 22:59:13 -04:00
Kevin Chung
a2e7a32754 Fix issue where current theme cannot be found in list of themes (#2079)
* Fix issue where current theme cannot be found in list of themes
2022-03-30 12:16:34 -04:00
Kevin Chung
00bb891457 Add code to check for the potential of session ID duplication during ID generation (#2075)
* Add code to check for the potential of session ID duplication during ID generation
2022-03-29 17:17:59 -04:00
Kevin Chung
fc7516c91f Show admins the email server error message when email sending fails (#2073)
* Show admins the email server error message when email sending fails
2022-03-24 14:14:55 -04:00
Kevin Chung
d29102dae8 Add meta and count field to teams endpoints to make it easier to show graphs (#2072)
* Add meta and count field to teams endpoints to make it easier to show graphs
2022-03-21 19:46:11 -04:00
Kevin Chung
f39043427b Fix CSV export columns for team & user fields on scoreboard CSV (#2069)
* Fix issue where custom field entries for Users and Teams would be misaligned in the scoreboard CSV export
2022-03-19 14:34:31 -04:00
Kevin Chung
c0f171f6bc Fix importing backups that contain challenge topics and custom fields (#2070)
* Fix issues with importing backups that contain Challenge Topics and Custom Fields
2022-03-19 11:32:17 -04:00
Kevin Chung
de9f2311eb Add client side vaildation for checking if users upload files that are probably too large (#2067)
* Add client side vaildation for checking if users upload files that are probably too large
* Closes #1972
2022-03-11 04:24:59 -05:00
Kevin Chung
262d896a0e Mark 3.4.3 (#2063)
# 3.4.3 / 2022-03-07

**Security**

- Bump cmarkgfm to 0.8.0 to resolve CVE-2022-24724. Copied entry from 3.4.2 since 3.4.2 introduced a bug that prevented writing raw HTML.

**General**

- Fix issue where raw HTML would not be rendered in markdown
2022-03-07 19:00:52 -05:00
Kevin Chung
7aea1ce347 Mark 3.4.2 (#2062)
# 3.4.2 / 2022-03-07

**Security**

- Bump cmarkgfm to 0.8.0 to resolve CVE-2022-24724

**General**

- Fix issue where unauthed users couldn't download challenge files after CTF end but viewing after CTF was enabled
2022-03-07 15:03:13 -05:00
Allen Guan
a868faffb5 Fix download with auth token fail after ctf (458ce2e) (#2011)
* Fix issue where unauthed users couldn't download challenge files after CTF end but viewing after CTF was enabled
2022-03-06 21:25:46 -05:00
Kevin Chung
de6f8e059b Migrate to self hosted mailing list (#2059)
* Migrate to self hosted mailing list
2022-03-06 01:29:36 -05:00
Kevin Chung
a8a6db1aeb Bump cmarkgfm to 0.8.0 (#2058)
* Bump cmarkgfm to 0.8.0
2022-03-05 20:27:09 -05:00
Kevin Chung
d9813a601f Mark 3.4.1 (#2055)
# 3.4.1 / 2022-02-19

**General**

- Make session cookies persist in the browser after close
- Fix issue where all-numeric registration codes wouldn't work
- Fix issue where a user's session isn't cleared properly after they are deleted by an admin
- Fix issue where CTF end time couldn't be set during setup

**API**

- Improved speed of the `/api/v1/challenges/[challenge_id]/solves` endpoint
- Document API authentication and `Content-Type` header requirement
- Add nested `UserSchema` and `TeamSchema` to `SubmissionSchema` for easier access to account name

**Admin Panel**

- Improve CSV import error reporting and validation
- Fix non-clickable checkbox label in user creation form in Admin Panel
- Allow submissions per minute ratelimit to be configurable in Admin Panel
- Add a link in the Pages Editor to the [Page Variables documentation page](https://docs.ctfd.io/docs/pages/variables/)

**Themes**

- Fix issue where invalid `theme_settings` can cause broken frontend
- Replace `node-sass` with `sass` and upgrade `sass-loader`

**Deployment**

- Serve all assets from CTFd regardless of internet availability (i.e. fonts and font-awesome)
- Fix regression in `REVERSE_PROXY` to allow comma seperated integers
- Bump `flask-restx` to 0.5.1
- Bump `pybluemonday` to 0.0.9
- Added support for S3 signature version 4 authentication to support alternative S3 buckets (Google Cloud Storage, DigitalOcean Spaces, etc)

**Miscellaneous**

- Add a Github Actions job to publish Docker images to Dockerhub and ghcr
2022-02-19 02:36:35 -05:00
Kevin Chung
54f0c46662 Bump pybluemonday to 0.0.9 (#2054)
* Bump pybluemonday to 0.0.9
* Bump python-geoacumen-city
* Use Python 3.7 in testing as Python 3.6 is EOL
2022-02-18 21:47:56 -05:00
Kevin Chung
69cfc77e94 Have fonts and fontawesome be loaded locally (#2050)
* Serve all assets from CTFd regardless of internet availability
* Closes #2048
2022-02-18 18:35:54 -05:00
Kevin Chung
03d65bf542 Have profile notify user to join/create a team (#2053)
* Have profile notify user to join/create a team (Closes #2013)
2022-02-18 18:02:41 -05:00
Kevin Chung
52d41bac61 Fix issue where end time couldn't be set during setup (#2052)
* Fix issue where end time couldn't be set during setup (Closes #2045)
2022-02-18 17:19:20 -05:00
Kevin Chung
27e77368c8 Improve speed of the ChallengeSolves API endpoint (#2046)
* Improve speed of the ChallengeSolves API (`/api/v1/challenges/[challenge_id]/solves`) endpoint
2022-02-09 21:03:44 -05:00
Kevin Chung
f89fcea1e2 Fix boto3 s3 signature (#2041) 2022-01-13 14:27:33 -05:00
Kevin Chung
c1a27176b6 Fix edge case where invalid theme_settings cause broken frontend (#2034)
* Fix edge case where invalid `theme_settings` cause broken frontend
2021-12-08 15:47:00 -05:00
nopresearcher
d79f24b2e5 added support for S3 signature version 4 authentication (#1882)
* added support for S3 signature version 4 authentication
2021-12-02 22:51:52 -05:00
Maxime P
3550aaf4ea Fixing challenge-desc content overflow (#1994)
* 🐛 fixing challenge-desc content overflow

Co-authored-by: Kevin Chung <kchung@ctfd.io>
Co-authored-by: Kevin Chung <kchung@nyu.edu>
2021-11-30 21:38:59 -05:00
Kevin Chung
5599e25fc9 Add nested UserSchema and TeamSchema to SubmissionSchema (#2030)
* Add nested UserSchema and TeamSchema to SubmissionSchema to allow easier access to a user/team name without issuing another query/API call
* Closes #2005
2021-11-22 23:28:58 -05:00
Kevin Chung
8e96344817 Fix issue with clearing user's session after deletion (#2029)
* Fix an issue where a user's session isn't cleared properly after they are deleted by an admin
* Closes #1996
2021-11-22 22:36:35 -05:00
Kevin Chung
3cbe463dae Change Github Action to run on release (#2028)
* Change Docker image release script to run on release
2021-11-22 21:11:00 -05:00
Kevin Chung
a9aa0cab61 Add a Github Actions job to publish Docker images to Dockerhub and ghcr (#2027)
* Add a Github Actions job to publish Docker images to Dockerhub and ghcr
* Closes #1982
2021-11-22 19:27:26 -05:00
Kevin Chung
cf743a2778 Add a link to page variables documentation (#2026)
* Adds a link in the Pages Editor to the Page Variables documentation page at https://docs.ctfd.io/docs/pages/variables/
* Closes #1983
2021-11-22 19:03:28 -05:00
Kevin Chung
4aa258e290 Fix sass dependencies to fix js build (#2025)
* Replace `node-sass` with `sass` and upgrade `sass-loader`
* Closes #2023
2021-11-22 18:26:49 -05:00
Kevin Chung
afb1a54e9b Add a way to configure challenge attempt ratelimiting (#2024)
* Allow submissions per minute ratelimit to be configurable
* Closes #2014
2021-11-22 17:16:21 -05:00
Nikita Stupin
a0783c334c Document API authentication (#2021)
* Document API authentication and Content-Type header requirement
2021-11-22 05:38:19 -05:00