Skip to content
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

Mark 3.1.0 #1634

Merged
merged 21 commits into from
Sep 8, 2020
Merged

Mark 3.1.0 #1634

merged 21 commits into from
Sep 8, 2020

Conversation

ColdHeat
Copy link
Member

@ColdHeat ColdHeat commented Sep 7, 2020

3.1.0 / 2020-09-08

General

  • Loosen team password confirmation in team settings to also accept the team captain's password to make it easier to change the team password
  • Adds the ability to add custom user and team fields for registration/profile settings.
  • Improve Notifications pubsub events system to use a subscriber per server instead of a subscriber per browser. This should improve the reliability of CTFd at higher load and make it easier to deploy the Notifications system

Admin Panel

  • Add a comments functionality for admins to discuss challenges, users, teams, pages
  • Adds a legal section in Configs where users can add a terms of service and privacy policy
  • Add a Custom Fields section in Configs where admins can add/edit custom user/team fields
  • Move user graphs into a modal for Admin Panel

API

  • Add /api/v1/comments to manipulate and create comments

Themes

  • Make scoreboard caching only cache the score table instead of the entire page. This is done by caching the specific template section. Refer to Make scoreboard caching only cache the score table #1586, specifically the changes in scoreboard.html.
  • Add rel=noopener to external links to prevent tab napping attacks
  • Change the registration page to reference links to Terms of Service and Privacy Policy if specified in configuration

Miscellaneous

  • Make team settings modal larger in the core theme
  • Update tests in Github Actions to properly test under MySQL and Postgres
  • Make gevent default in serve.py and add a --disable-gevent switch in serve.py
  • Add tenacity library for retrying logic
  • Add pytest-sugar for slightly prettier pytest output
  • Add a listen() method to CTFd.utils.events.EventManager and CTFd.utils.events.RedisEventManager.
    • This method should implement subscription for a CTFd worker to whatever underlying notification system there is. This should be implemented with gevent or a background thread.
    • The subscribe() method (which used to implement the functionality of the new listen() function) now only handles passing notifications from CTFd to the browser. This should also be implemented with gevent or a background thread.

ColdHeat and others added 18 commits August 12, 2020 19:55
* Add a comments functionality for admins to discuss challenges, users, teams, pages
* Adds `/api/v1/comments`
* Adds a `CommentBox.vue` component for the Admin Panel
* Closes #321
* Add a comments section for a user's page in the Admin Panel
* Move user graphs into a modal for Admin Panel
* Create a new webpack JS chunk for the admin section for the Vue components (`components.js`)
  - Not really sure why webpack needed this to be separated out
* Closes #1052
* Add comments to Page editors
* Make scoreboard caching only cache the score table instead of the entire page
* Closes #1584
#1598)

* Loosen team password confirmation to also accept team captain password
* Make team settings modal larger in the core theme
* Add help text in team settings form
* Closes #1545
* Fix MySQL and Postgres GitHub actions to properly test databases
* Add migration to add `comments` table
* Add pagination to `/api/v1/comments` 
* Update CommentBox component to have pagination buttons
* Closes #1599
* Adds the ability to add custom user fields for registration/profile settings
* Admins can create fields that users can optionally edit 
* Works on #756
* Adds custom fields for teams
* Closes #756
* Add a `listen()` method to `CTFd.utils.events.EventManager` and `CTFd.utils.events.RedisEventManager`. 
  * This method should implement subscription for a CTFd worker to whatever underlying notification system there is. This should be implemented with gevent or a background thread.
  * The `subscribe()` method (which used to also implement the functionality of the new `listen()` function) now only handles passing notifications from CTFd to the browser. This should also be implemented with gevent or a background thread. 
* Pool PubSub connections to Redis behind gevent. This improves the notification system by not having a pubsub connection per browser but instead per CTFd worker. This should reduce the difficulty in deploying the Notification system.
* Closes #1622 
* Make gevent default in serve.py and add a `--disable-gevent` switch in serve.py
* Revert to recommending `serve.py` first in README. `flask run` works but we don't get a lot of control.
* Add `tenacity` library for retrying logic
* Add `pytest-sugar` for slightly prettier pytest output
* Add rel=noopener to external links to prevent tab napping attacks
* Adds a legal section where users can add a terms of service and privacy policy
* Optionally show links to the TOS and Privacy Policy on the registration page
* Closes #1621
@codecov
Copy link

codecov bot commented Sep 7, 2020

Codecov Report

Merging #1634 into master will increase coverage by 3.43%.
The diff coverage is 93.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1634      +/-   ##
==========================================
+ Coverage   86.24%   89.67%   +3.43%     
==========================================
  Files         115      120       +5     
  Lines        5516     6085     +569     
==========================================
+ Hits         4757     5457     +700     
+ Misses        759      628     -131     
Impacted Files Coverage Δ
CTFd/utils/events/__init__.py 82.60% <70.21%> (-6.73%) ⬇️
CTFd/views.py 87.05% <76.47%> (-0.93%) ⬇️
CTFd/api/v1/config.py 92.36% <92.30%> (-0.12%) ⬇️
CTFd/schemas/users.py 94.93% <93.65%> (-0.94%) ⬇️
CTFd/schemas/teams.py 86.58% <93.93%> (+5.21%) ⬆️
CTFd/api/v1/comments.py 94.02% <94.02%> (ø)
CTFd/forms/users.py 97.50% <96.36%> (-2.50%) ⬇️
CTFd/forms/teams.py 98.19% <97.59%> (-1.81%) ⬇️
CTFd/models/__init__.py 95.64% <98.66%> (+0.50%) ⬆️
CTFd/constants/__init__.py 92.59% <100.00%> (+0.59%) ⬆️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1d7910...818cd68. Read the comment docs.

@ColdHeat ColdHeat merged commit 9264e96 into master Sep 8, 2020
@ColdHeat ColdHeat deleted the 3.1.0-dev branch November 16, 2020 18:33
UnknownSilicon pushed a commit to UnknownSilicon/CTFd that referenced this pull request Oct 4, 2023
# 3.1.0 / 2020-09-08

**General**

- Loosen team password confirmation in team settings to also accept the team captain's password to make it easier to change the team password
- Adds the ability to add custom user and team fields for registration/profile settings.
- Improve Notifications pubsub events system to use a subscriber per server instead of a subscriber per browser. This should improve the reliability of CTFd at higher load and make it easier to deploy the Notifications system

**Admin Panel**

- Add a comments functionality for admins to discuss challenges, users, teams, pages
- Adds a legal section in Configs where users can add a terms of service and privacy policy
- Add a Custom Fields section in Configs where admins can add/edit custom user/team fields
- Move user graphs into a modal for Admin Panel

**API**

- Add `/api/v1/comments` to manipulate and create comments

**Themes**

- Make scoreboard caching only cache the score table instead of the entire page. This is done by caching the specific template section. Refer to CTFd#1586, specifically the changes in `scoreboard.html`.
- Add rel=noopener to external links to prevent tab napping attacks
- Change the registration page to reference links to Terms of Service and Privacy Policy if specified in configuration

**Miscellaneous**

- Make team settings modal larger in the core theme
- Update tests in Github Actions to properly test under MySQL and Postgres
- Make gevent default in serve.py and add a `--disable-gevent` switch in serve.py
- Add `tenacity` library for retrying logic
- Add `pytest-sugar` for slightly prettier pytest output
- Add a `listen()` method to `CTFd.utils.events.EventManager` and `CTFd.utils.events.RedisEventManager`.
  - This method should implement subscription for a CTFd worker to whatever underlying notification system there is. This should be implemented with gevent or a background thread.
  - The `subscribe()` method (which used to implement the functionality of the new `listen()` function) now only handles passing notifications from CTFd to the browser. This should also be implemented with gevent or a background thread.
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.

1 participant