Commit Graph

60 Commits (b78589d20de4abf97067c3b1c1cbfe72b498f616)

Author SHA1 Message Date
Kevin Chung aedd753f4e
Bypass csrf plugins (#597)
* Add bypass_csrf_protection decorator
* Add beta notice
* Add test_bypass_csrf_protection
2018-03-24 22:54:12 -04:00
Nick Gonella 6eebd5d220 Don't display team rank in workshop mode (#590)
* Don't display team rank in workshop mode
2018-03-20 00:48:14 -04:00
krzys_h 62f6e6ff84 Fix scoreboard tie resolving with 0-point chals (#577) (#578)
* Fix scoreboard tie resolving with 0-point chals
* Closes #577
2018-02-19 20:26:06 -05:00
Kevin Chung fe4ea56e92
Bootstrap beta 3, Regression fixes, bugfixes (#543)
* Upgrade to Bootstrap v4 beta 3

* Fix incorrect FontAwesome5 icon

* Fixing regressions & code quality issues. Files, Tags & Hints now appear in the admin challenge preview. Fixed color issues with file buttons and badges. Pass script_root into challenge type plugin.

* Fixing incorrect FontAwesome5 icon

* Fix test for /admin/chals/<chalid>

* Expand test to include tags, hints, files
2018-01-07 20:50:01 -05:00
Kevin Chung fa9cb2498b
Guarantee ctf version (#538)
* Make sure ctf_version is set correctly
2017-12-22 16:22:31 -05:00
Kevin Chung 25698a7b6c
Sandbox themes (#534)
* Use the Jinja sandbox to render themes
* Prevent get_config from accessing config.py values
* Add get_app_config
* Add tests for sandbox
2017-12-20 00:11:42 -05:00
Kevin Chung 4772c63a8e
Use mailserver before mailgun & test mailgun behavior (#532) 2017-12-19 03:51:00 -05:00
Kevin Chung 18d6fa26d2
Adding an error message for invalid confirm/reset links (#525)
* Adding an error message for invalid confirm/reset links 
* Add tests for expired/invalid links
* Avoid non-unicode crash in base64 utilities
* Centering confirm email button
2017-12-13 22:34:53 -05:00
Kevin Chung a571cf1baf
Improve imports/exports to reduce the likelihood of a conflict (#523)
* Improve imports/exports to reduce the likelihood of a conflict
* To allow previous version imports of keys to work - fill in key `type` from `key_type`. (#520)
* Adding an import_ctf test
2017-12-12 05:43:27 -05:00
Kevin Chung 3af98b17d5
Version 1.1 CTFd (#514)
* Bootstrap v4 (#490)
* Upgrading original theme to use Bootstrap v4 and overall improve use of utility classes
* Fixing graph issues. Colors per team & cleaner hover
* The solves tab now shows relative time instead of absolute time
* Redesign admin theme
* Updating modals and changing form name from desc to description
* Moving CSS config from Pages to Config page
* Adding IP address count to statistics
* Move control of certain modals (files, flags, tags, hints) to challenges page
* Expanding size of config page
* Combining statistics and graphs pages
* Moving percentage solved to the statistics page instead of the admin challenges page

* Rename Keys.key_type to Keys.type (#459) (#478)

* Rename keys.key_type to keys.type (#459)
* Fixing previous migration to not be worried about key_type v type

* Fixing loading of challenge type plugins

* Switching from Handlebars to Nunjucks (#491)

* Switching from Handlebars to Nunjucks
* Allow admins to unlock hints before CTF begins and test that this is not allowed for regular users

* Authed only (#492)

* Adding authed_only decorator and adding next to url_for

* Adding a basic preview to hints (#494)

* Hints have a preview now for creating and updating hints. HTML and markdown are still allowed.

* Ezq (#495)

* Adding ezq as a simple wrapper around bootstrap modals

* Use tabs not spaces and remove gray background on inputs

* Adding title & draft to Pages. Making page preview open a new tab (#497)

* Adding title & draft to Pages.
* Making page preview open a new tab instead of render in the existing tab
* Draft pages cannot be seen without a preview

* Update check (#499)

* Add update_check function
* Notify user that a CTFd update is available in the admin panel
* Adding update_check tests

* Ratelimit (#500)

* Implementing a ratelimit function 
* Fix error page formatting
* Add rate limiting tests
* Rate limit authentication functions and rate limit admin send email function

* Load user solves before we load challenges to avoid unstyled buttons (#502)

* Add a challenge preview (#503)

* Adding a challenge preview to the admin panel
* Change /admin/chals/<int:chalid> to /admin/chal/<int:chalid>

* Adding codecov (#504)

* Test coverage at https://codecov.io/gh/CTFd/CTFd

* Sendmail improvements (#505)

* Add get_smtp timeout, add sendmail error messages
* Adding more error handling to sendmail

* Adding Flask-Script (#507)

* Pause ctf (#508)

* Implement CTF pausing
* Test CTF pausing

* Fix loading challenges for users (#510)

* Fix loading challenges for users
* Temporarily switch themes in test

* Pause help text (#509)

* Adding pause help text

* Pages authed (#511)

* Adding authentication options to pages
* Adding tests for accessing pages while draft & auth_required

* Merging master into 1.1 (#513)

* Name the core theme and remove the original theme
2017-12-11 06:42:07 -05:00
Kevin Chung db2e3b5684
Profile insertion check (#484)
* Test setting profile
* Fix issue with app_context altering database connections/state
2017-11-26 04:22:15 -05:00
Kevin Chung 18dd715276
Workshop mode (#477)
* Implementing workshop mode
* Fixing a bug in /chals/solves where challenges with 0 solves weren't hidden.
* Spinner errors are now 20vh down instead of 210px down
* Users now use their private team endpoint at /team instead of /team/<id>
2017-11-22 03:33:48 -05:00
Kevin Chung 7348515e6c
34 reduce auth restrictions (#474)
* Disallow email-address team names & allow login with team name or email address
* Don't show password reset form if server isn't configured
* Add a message to contact admins instead of submit password reset form
* Add utils.check_email_format()
2017-11-21 22:20:31 -05:00
Jared Deckard e10c8b103b Admin Team List - New Team (#470)
* Allow admins to create teams manually
* Test an admin creating a team
2017-11-18 21:30:09 -05:00
Kevin Chung 0b0305f969
Adding tests for verify_emails and user_can_view_challenges are set (#462)
* Fixing verify_emails + user_can_view_challenges logic
* Adding tests for verify_emails and user_can_view_challenges
2017-11-15 03:33:50 -05:00
Kevin Chung 647d8e0b2d
Fixing challenge creation test (#460) 2017-11-14 23:12:28 -05:00
Kevin Chung 6fbef4f32e
Allowing pages to have slashes in them but removing leading slashes (#457)
* Allowing pages to have slashes in them but removing leading slashes
* Add tests for pages
2017-11-14 22:31:59 -05:00
Kevin Chung 117b43e3c5
Preventing Hints from being unlocked after the end of a CTF (#439)
* Preventing Hints from being unlocked after the end of a CTF unless challenges can be viewed
2017-11-08 02:13:07 -05:00
Kevin Chung 6f4a520241
Hidden challenges now return 404 and can't be solved (#432)
* Hidden challenges now return 404 and can't be solved
2017-10-28 13:31:34 -04:00
Kevin Chung b5a383a2e1 Navbar links (#427)
* Adding config.json concept in lieu of config.html
* Add links to the admin menubar from a plugin
* Add links to the user navigation menubar from plugin
* Add tests for navbar links
* Closes #423
2017-10-25 00:05:27 -04:00
Kevin Chung 710ce6d500 Custom challenge tables (#425)
* Allows Challenges to have custom tables which allow them to have custom behavior 
* Adding create, update, delete staticmethods giving Challenge Types a static interface to implement
2017-10-24 21:06:56 -04:00
Kevin Chung 39b9dc5945 Create a private team endpoint (#413)
* Adding private /team endpoint
2017-10-16 13:57:40 -04:00
Kevin Chung 066fbedd8b Pass all failure attempts to the challenge plugin (#411)
* Pass all failure attempts to the challenge plugin
2017-10-14 18:04:22 -04:00
Kevin Chung 4e80b514f4 Add plugin wrappers for plugin related utils functions (#410) 2017-10-14 17:17:06 -04:00
Kevin Chung 6117699260 Use strings for key type (#409)
* Store key_type as string in the database
* Give keys plugin the ability to know where the modals are stored and pass this information to the client
2017-10-14 16:37:41 -04:00
Kevin Chung b4bdef966c Update requirements (#406)
* Updating to use dataset and datafreeze
     * Use a new datafreeze serializer to get around Python 3 issues. 
* Update requirements.txt
* Add simple test for export_ctf()
2017-10-07 21:29:03 -04:00
Kevin Chung 608d4f43d9 Adopting a challenge type layout from deckar01 (#399)
* Adopting a challenge type layout from deckar01
* Move standard challenge modals into the plugin
* Migration to change challenge type id to a string
* Travis testing now builds with MySQL, SQLite, and Postgres
* Rework get_standings to use the row ID instead of the saved time because of differences in database time precision
2017-10-05 21:39:28 -04:00
Kevin Chung faa84ff1e5 Adding functions to register plugin assets (#397)
* Adds functions to register plugin assets
2017-09-29 21:22:10 -04:00
Kevin Chung a20e7eae63 Improve Challenge type plugin staticmethods (#394)
This passes more logic into the challenge classes so that it can be accessed by plugins
2017-09-27 17:01:58 -04:00
Kevin Chung c97e7c6edc Fixing issues with loading /chals when unregistered (#388) 2017-09-13 12:01:09 -04:00
Kevin Chung d49f37eac4 Fixing unlocking hints for challenges with unicode names (#383)
* Fixing unlocking hints for challenges with unicode names
* Add tests for unlocking hints with no cost
2017-09-09 00:17:48 -04:00
Kevin Chung 888b830488 Cleaning some challenge endpoints (#382)
* Cleaning some challenge endpoints
* Adding test for /chals/solves
2017-09-08 02:07:06 -04:00
Kevin Chung 2facb0ca8c Top ten endpoint honors users with the same name (#379)
* Make the /top/10 endpoint honor users with the same name
2017-09-07 23:29:41 -04:00
Kevin Chung 08f3496174 Plugins can register css files (#375)
* Adding functions to register CSS files
* Adding tests for script and stylesheet registering
2017-09-04 05:58:32 -04:00
Kevin Chung 6f60ddd2f5 Admins can bypass ctftime (#374)
* Admins can see/solve challenges regardless of ctftime
* Adding tests for ctftime based functionality
2017-09-04 05:03:06 -04:00
Kevin Chung 00c68dd239 Adding test for encoding emails with plus signs (#363) 2017-08-26 13:07:02 -04:00
Kevin Chung 732e343aea Pushing new tests and freezegun (#360) 2017-08-22 23:49:48 -04:00
Kevin Chung 2e41886591 Refactor Containers into a plugin (#348)
* Removing Containers code
* Closes #301
2017-08-20 19:40:46 -04:00
Kevin Chung 0aa0e9c5c1 Fixing email confirmation and adding more base64 tests (#344)
* Fixing email confirmation and adding more base64 tests
2017-08-09 05:31:00 -04:00
Kevin Chung 1a077f72ed Using a Python 3 compatible base64 encoder and fixing verify_emails in Python 3 (#336) 2017-08-09 04:17:10 -04:00
Kevin Chung 7aa6204116 Users should always be able to get their score, even if banned (#333)
* Users should always be able to get their score, even if banned
* Fixing scoring logic when users haven't solved problems
* Hide None descriptions for awards
2017-08-06 19:33:02 -04:00
Kevin Chung d84cd305f8 Fixing scoring logic (#320)
* fix inconsistent scoring: take awards into account in user.place() (#319)
* Adding tests
2017-07-17 22:18:23 -04:00
Kevin Chung b900d1cb68 Fixes #315 (#316)
CTFd creates the database instead of the docker-compose files which allows us to control encoding. Also adds a test for registering with a unicode team name.
2017-07-16 02:50:32 -04:00
Kevin Chung 92f130d5de Fixing large ip solves (#307)
* Switching to using strings to store IP addresses because of the issues with storing them properly, Fixes #302, Fixes $306
* Only runs migrations when using a real database because SQlite is too inflexible to support migrations properly
* Removes calls to the ip helper functions but they can remain in case someone needs them in a plugin.
2017-07-08 17:53:14 -04:00
Kevin Chung 7d5537e1df Adding SMTP sendmail unit test (#299) 2017-07-01 12:36:02 -04:00
Kevin Chung 95245d2ab5 Send confirmation emails on register and add button to resend email (#298)
* Fixes #293
* Adding get_config/set_config test
2017-07-01 01:37:08 -04:00
Kevin Chung f1e339c3dc Adding override_template function (#297)
Purely for use by plugins to replace templates in an existing theme
2017-06-27 21:09:38 -04:00
Kevin Chung b6ce783cfd Fixes unstyled Setup UI (#291)
* Changing /static to /themes
* Adding test to make sure setup behavior works
2017-06-18 18:54:20 -04:00
Kevin Chung 1bbd7feb23 Moving themes into a themes folder (#287)
* Moving themes into a themes folder

This unifies themes under a themes folder which makes it easier to develop themes and install them.
2017-06-18 02:13:50 -04:00
Kevin Chung 202e8493b1 Give ip2long and long2ip ipv6 support (#271)
Improved ipv6 support in the `ip2long` and `long2ip` helper functions
2017-06-05 02:42:11 -04:00