Commit Graph

845 Commits (bulk-clear-sessions)

Author SHA1 Message Date
Kevin Chung 8b2c75761b
Merge branch 'master' into bulk-clear-sessions 2020-05-04 10:53:33 -04:00
Kevin Chung 5dc7fc6434
Merge pull request #1376 from CTFd/dependabot/npm_and_yarn/lodash-4.17.15
Bump lodash from 4.17.11 to 4.17.15
2020-05-04 10:53:18 -04:00
Kevin Chung 83f3f5d28a
Merge branch 'master' into dependabot/npm_and_yarn/lodash-4.17.15 2020-05-04 09:50:41 -04:00
Kevin Chung 66109629a3
Merge pull request #1377 from CTFd/dependabot/npm_and_yarn/eslint-utils-1.4.3
Bump eslint-utils from 1.3.1 to 1.4.3
2020-05-04 09:50:28 -04:00
Kevin Chung f0921f42f5 Run format 2020-05-04 09:49:31 -04:00
Kevin Chung 49816c730b
Merge branch 'master' into dependabot/npm_and_yarn/eslint-utils-1.4.3 2020-05-04 04:08:51 -04:00
Kevin Chung 7646707b8a
Merge branch 'master' into bulk-clear-sessions 2020-05-04 04:06:43 -04:00
Kevin Chung 672798ece6 Add a test for clear_all_user_sessions 2020-05-04 04:06:29 -04:00
Kevin Chung 056ba7e189
Merge branch 'master' into dependabot/npm_and_yarn/lodash-4.17.15 2020-05-04 03:53:50 -04:00
Kevin Chung 8e53db1617
Merge pull request #1375 from CTFd/dependabot/npm_and_yarn/acorn-5.7.4
Bump acorn from 5.7.3 to 5.7.4
2020-05-04 03:53:33 -04:00
Kevin Chung e65d60bed1 Add function mass clear user/team sessions 2020-05-04 03:44:02 -04:00
dependabot[bot] 2b958c3a82
Bump eslint-utils from 1.3.1 to 1.4.3
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.3.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-05-04 06:26:13 +00:00
dependabot[bot] 02f0f28365
Bump lodash from 4.17.11 to 4.17.15
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
2020-05-04 06:26:13 +00:00
dependabot[bot] ddfa337ef3
Bump acorn from 5.7.3 to 5.7.4
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-05-04 06:26:13 +00:00
Kevin Chung bd4900b896
Merge pull request #1361 from CTFd/2.4.0-dev
2.4.0 / 2020-05-04
==================

**General**
* Cache user and team attributes and use those perform certain page operations intead of going to the database for data
    * After modifying the user/team attributes you should call the appropriate cache clearing function (clear_user_session/clear_team_session)
* Cache user IPs for the last hour to avoid hitting the database on every authenticated page view
    * Update the user IP's last seen value at least every hour or on every non-GET request
* Replace `flask_restplus` with `flask_restx`
* Remove `datafreeze`, `normality`, and `banal` dependencies in favor of in-repo solutions to exporting database

**Admin Panel**
* Add bulk selection and deletion for Users, Teams, Scoreboard, Challenges, Submissions
* Make some Admin tables sortable by table headers
* Create a score distribution graph in the statistics page
* Make instance reset more granular to allow for choosing to reset Accounts, Submissions, Challenges, Pages, and/or Notificatoins
* Properly update challenge visibility after updating challenge
* Show total possible points in Statistics page
* Add searching for Users, Teams, Challenges, Submissions
* Move User IP addresses into a modal
* Move Team IP addresses into a modal
* Show User website in a user page button
* Show Team website in a team page button
* Make the Pages editor use proper HTML syntax highlighting
* Theme header and footer editors now use CodeMirror
* Make default CodeMirror font-size 12px
* Stop storing last action via location hash and switch to using sessionStorage

**Themes**
* Make page selection a select and option instead of having a lot of page links
* Add the JSEnum class to create constants that can be accessed from webpack. Generate constants with `python manage.py build jsenums`
* Add the JinjaEnum class to inject constants into the Jinja environment to access from themes
* Update jQuery to 3.5.0 to resolve potential security issue
* Add some new CSS utilities (`.min-vh-*` and `.opacity-*`)
* Change some rows to have a minimum height so they don't render oddly without data
* Deprecate `.spinner-error` CSS class
* Deprecate accessing the type variable to check user role. Instead you should use `is_admin()`

**Miscellaneous**
* Enable foreign key enforcement for SQLite. Only really matters for the debug server.
* Remove the duplicated `get_config` from `CTFd.models`
* Fix possible email sending issues in Python 3 by using `EmailMessage`
* Dont set User type in the user side session. Instead it should be set in the new user attributes
* Fix flask-profiler and bump dependency to 1.8.1
* Switch to using the `Faker` library for `populate.py` instead of hardcoded data
* Add a `yarn lint` command to run eslint on JS files
* Always insert the current CTFd version at the end of the import process
* Fix issue where files could not be downloaded on Windows
2020-05-04 02:25:26 -04:00
Kevin Chung fb6b30ab1b Fix lint 2020-05-04 01:29:28 -04:00
Kevin Chung 2c4259c999 Bump release date 2020-05-04 01:04:37 -04:00
Kevin Chung 625c17db30 Invalidate any previously cached attributes on user login 2020-05-03 20:47:25 -04:00
Kevin Chung 7779175eea Set date 2020-05-03 03:22:43 -04:00
Kevin Chung f559c7d8fc
Merge pull request #1373 from CTFd/bulk-table-profile-actions
* Convert Admin Panel User/Team submission actions to be bulk actions
* Add "Mark Missing" feature for Teams
2020-05-03 01:10:35 -04:00
Kevin Chung 1befbedee0 Fix lints 2020-05-02 23:57:54 -04:00
Kevin Chung ba4fce4736 Update changelog 2020-05-02 23:18:54 -04:00
Kevin Chung 0ff9d142f7 Use sessionStorage to store most recently used tabs instead of the location hash 2020-05-02 23:04:58 -04:00
Kevin Chung 494052fb44 Bump min-vh 2020-05-02 20:38:15 -04:00
Kevin Chung 0d904d0628 Run yarn build 2020-05-02 19:37:26 -04:00
Kevin Chung a2e5aa4b9e Add team mark missing 2020-05-02 15:04:04 -04:00
Kevin Chung 76bd626c36 Make bulk mark correct work for users 2020-05-02 14:35:47 -04:00
Kevin Chung c101204879 Add bulk user page actions 2020-05-02 14:23:15 -04:00
Kevin Chung 5a9d79f2bb Add bulk table actions for team page 2020-05-02 14:09:52 -04:00
Kevin Chung 735faf0e23 Mark new version and add rough changelog 2020-05-02 02:49:03 -04:00
Kevin Chung 073c8c713d Remove small 2020-05-01 21:10:10 -04:00
Kevin Chung 3d652a968e Clean up some ui interactions 2020-05-01 21:03:15 -04:00
Kevin Chung 9003c29846 Fix up some of the tables when data is too long 2020-05-01 17:26:06 -04:00
Kevin Chung fe97385f69
Merge pull request #1371 from CTFd/ip-address-admin-modal
* IP Tracking cache returns the IPs used by the user in the last hour. This way we can track the "Last Seen" value better for GET requests. 
* Moves IP addresses in the Admin Panel for Users and Teams into a modal
* Closes #1146
2020-05-01 02:44:33 -04:00
Kevin Chung 512a7d546b
Merge pull request #1372 from CTFd/better-spacing-without-solves
* Use some better utility CSS classes for better spacing when there isn't any content
2020-05-01 02:34:50 -04:00
Kevin Chung 0614bc9cf2 Run make format and yarn build 2020-04-30 22:23:14 -04:00
Kevin Chung 95d581ed33 Add better spacing for when there aren't solves to populate dtta 2020-04-30 22:14:32 -04:00
Kevin Chung c47955ff4f Always record IP usage on non-GET and clean up HTML 2020-04-30 21:10:43 -04:00
Kevin Chung e5814592c4 Run yarn build and add empty line to end of files 2020-04-30 20:36:57 -04:00
Kevin Chung 01f2d50a34 Rewrite IP tracking code to only return recent IPs. Move IPs into a modal for admin panel. 2020-04-30 20:32:26 -04:00
Kevin Chung 1c10643537
Merge pull request #1367 from CTFd/cache-user-ips-for-tracker
* Cache user IPs and only update IP usage on new IPs or on non-GET requests
2020-04-30 16:04:46 -04:00
Kevin Chung b4f39e843d
Merge pull request #1368 from CTFd/update-jquery-3.5.0
* Update jQuery to 3.5.0 to resolve potential security issue (https://github.com/advisories/GHSA-jpcq-cgw6-v4j6)
2020-04-30 15:57:33 -04:00
Kevin Chung 2f1b3265f8 Run make lint 2020-04-30 14:39:42 -04:00
Kevin Chung 7d35e552bc Merge remote-tracking branch 'origin/2.4.0-dev' into update-jquery-3.5.0 2020-04-30 14:34:47 -04:00
Kevin Chung c69633b479 Remove testing data 2020-04-30 03:33:55 -04:00
Kevin Chung b3b654bf03 Rebase 2.4.0-dev 2020-04-30 03:21:13 -04:00
Kevin Chung 0bd6c0d958 Merge remote-tracking branch 'origin/2.4.0-dev' into cache-user-ips-for-tracker 2020-04-30 03:10:31 -04:00
Kevin Chung 431c35cb51
Merge pull request #1363 from CTFd/is_admin_func_cache_hit
* Make the `is_admin()` function avoid DB hits and mostly hit cache. This is accomplished by creating a cached object that mimics the actual User model object. This object should be invalidated every time that the User object is modified.
* Add `get_current_user_attrs`, `get_current_team_attrs` and `get_ip` to Jinja
* Update `flask-profiler` to 1.8.1 and fix `flask-profiler` configuration to work better
2020-04-30 03:07:59 -04:00
Kevin Chung 0d97c3539a Update jQuery to 3.5.0 2020-04-30 02:57:22 -04:00
Kevin Chung 87895918f5 Fix tracker code to fix tests 2020-04-30 02:45:12 -04:00