Commit Graph

506 Commits (3e8f13dfd16b213e1f63d30628df225eeb1d032f)

Author SHA1 Message Date
Kevin Chung cf3e5cbbbd Adding link back and social detail 2017-04-28 02:36:16 -04:00
Kevin Chung c493329bf8 Extract files during import_ctf 2017-04-26 23:58:51 -04:00
Kevin Chung 8af911b745 Add import.py script 2017-04-26 22:46:06 -04:00
Kevin Chung 3488baf504 Fixing tag submission 2017-04-24 19:25:20 -04:00
Björn Kimminich ebd303a920 Use headlines in README (#249)
+ legibility
+ ability to link to section anchors directly
2017-04-20 19:27:16 -04:00
Kevin Chung ad34dbf970 Fixing key updating 2017-04-20 17:59:45 -04:00
Kevin Chung 4795a9e742 Fixing key editting 2017-04-20 16:59:43 -04:00
Kevin Chung f4d766473d Import export (#244)
* Adding dataset and export function

* Removing unnecessary print

* First try at import_ctf

* Adding UI components

* First successful export and import

* Importing configs

* Alerting response for now
2017-04-14 02:53:36 -04:00
Kevin Chung 80575e98fe Fixing preview height 2017-04-09 02:31:59 -04:00
Victor "Nate" Graf 3add93a172 fixed an eror in admin chllenge modals naming (#242)
Although the code worked, I accidentally included a pull of an
empty file. This commit fixes that mistake
2017-04-09 01:55:56 -04:00
Kevin Chung f07a39c343 Updating Docker files
Thanks @erasche for these changes from PR #204.
2017-04-08 17:35:18 -04:00
Kevin Chung aa21a3c161 Fix chal deletion (#241)
* improving get_config
* Fixing challenge deletion
* Puts challenge deletion under utils.delete_file
2017-04-08 03:29:11 -04:00
Kevin Chung b2fc5a6fcd improving get_config (#240) 2017-04-08 02:51:28 -04:00
Kevin Chung 72f7eeb0a4 Adds delete_file util (#239) 2017-04-08 01:34:22 -04:00
Victor "Nate" Graf fd22ef98dc challenge update modal is now replaceable (#236)
* challenge update modal is now replaceable

By defining
* [type]-challenge-update.hbs
* [type]-challenge-modals.hbs
* [type]-challenge-update.js

in the /static/admin/js/templates/challenges/[type] folder the
challenge update modal will be defined for any challenges of
the given type. This allows for essentially full customizability
of how you will edit custom challenge types in the admin UI.

The reason for having two files, *update.hbs and *modals.hbs, is
that *update.hbs defines the body for the main challenge update
modal, while *modals.hbs defines any additional modals which will be
used within the main modal

There is one function which is required in *update.js is
`openchal(id)` which will be passed the id of the challenge to be
edited and should open the modal as well as load any needed data

* fixed multi-modal issues

Issues were coming from two sources:
* I had placed the modals in an indirect relationship in the DOM
  tree. They need to be siblings I now see
* There was double counting of modals within multi-modal.js. This
  only started to appear with the dynamically loaded modals. I
  fixed the script to accurately count modals each time
2017-04-08 01:20:22 -04:00
Kevin Chung b027703f80 Fixing hiding challenges unintentionally 2017-04-04 03:48:55 -04:00
Kevin Chung 98071c1874 Passes management of the description to the js template 2017-04-01 16:43:41 -04:00
Kevin Chung f48a0cdacd Hints (#232)
* Switching to Flask-Migrate to create tables/database. Adding Hints & Unlocks.
* Adding db.create_all call for sqlite db's (sqlite is not properly handled with alembic yet)
* Python 3 testing works properly with 3.5
* Adding admin side of hints
* Hints are viewable for users
2017-03-28 21:17:56 -04:00
Rakha Kanz Kautsar 9a9b775e57 add scoreboard freeze (#208)
* add scoreboard freeze

* delete excess div close tag

* filter out scores from team page when scoreboard freezes

* allow teams to see their full score and solves in team page

* fix unset place and score

* change parameter and filter out /solves for graph

* fix utils methods undefined

* add small notice about frozen scoreboard and resolve failing tests

* Update __init__.py

* Update scoreboard.py
2017-03-25 01:37:37 -04:00
Kevin Chung a3a7d75ae8 Plugins enhanced utils (#231)
* Updating utils functions to be monkey patchable

* Also fixing a team email update issue

* Adding more tests
2017-03-22 20:00:45 -04:00
Kevin Chung ede7f1bad2 Update README.md
Links to new repo location
2017-03-12 20:14:13 -04:00
Kevin Chung 06d0e00cf5 Fixes Python 3 compatibility for testing (#230)
* Testing 3.6

* Fixing Python 3 testing

* Fixing both kinds of tests :)

* PEP8 lint project and add linting checks to build process (#229)

* Revert "PEP8 lint project and add linting checks to build process (#229)"

This reverts commit 15d89d2b66030cdc2a6276b0a73acaa4912c06ab.
2017-03-12 19:53:26 -04:00
Kevin Chung 57de89fc57 Removing functionality from the update keys button
This makes the button do nothing but ultimately the issue is that the
buttons should automatically update the database through AJAX or
similar. This is a temporary fix so the Keys modal isn’t an outlier in
design and doesn’t cause an error.
2017-03-12 11:12:44 -04:00
mschwager 7cbbeb0843 Fix undefined variable (#228) 2017-03-10 11:19:27 -05:00
Kevin Chung 15171f1140 setup now automatically logs in 2017-03-10 11:12:58 -05:00
Kevin Chung 967129a009 Closes #225
Also removes unnecessary pip install from travis config
2017-03-10 01:17:17 -05:00
Kevin Chung 613ede5738 Max attmpts (#227)
* Making max_attempts use the Challenge value instead of the Config value
2017-03-09 23:47:08 -05:00
mschwager 92c7f2e293 Added CI integration with Travis-CI (#226)
Next steps:

* Go to https://travis-ci.org/
* Click "Sign in with GitHub"
* Click your user icon and click "Accounts"
* Enable for CTFd
2017-03-09 22:00:01 -05:00
Kevin Chung 72913b1a70 Marking 1.0.1 2017-03-08 01:44:12 -05:00
Thomas Gerot a390a06861 Added Python3 compatibility to print statements (#220) 2017-03-08 00:43:52 -05:00
Kevin Chung 41eaa56232 Fixes #214
Python3 compatability
2017-03-08 00:45:33 -05:00
Kevin Chung 05ff3afe8c Delete config.html 2017-03-08 00:35:09 -05:00
Kevin Chung d0cb92c644 Hide scores (#224)
* Starting work on hide_scores functionality

* Hide teams in more views

* Starting work on hide_scores functionality

* Hide teams in more views
2017-03-08 00:21:39 -05:00
mschwager e9df6bf803 Pin third-party Python packages (#223) 2017-03-07 13:34:50 -05:00
Kevin Chung c1e9cffc94 Adding a rudimentary plugin configuration page (#219)
* Adding a rudimentary plugin configuration page

* Streamlining changes
2017-03-07 01:07:32 -05:00
mschwager e237715b33 Pin Ubuntu version and follow Dockerfile best practices (#218)
Docker provides some useful resources for Ubuntu as a base image
and installing software via apt-get:

https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#apt-get

It's also useful to pin the Ubuntu version to 16.04 so we have a good
idea of what OS we're using in the image. To that end, I think we can
also avoid performing an upgrade so we can even further control which
versions of software we're using. If we do an upgrade then you'll have
different versions of software depending on when you build the image.
2017-03-06 20:17:31 -05:00
Kevin Chung 4b077dfa37 Working on #187
Improvements to Dockerfile.
2017-03-03 01:37:46 -05:00
Kevin Chung e3fd784d91 Merging PR #206 into master (#215)
* Extracting key checking logic to make it more extensible

* Add missing keys __init__ file

* Adding logging access and errors to Dockerfile

* Use template inheritance for page.html (#198)

* Fix exception on cofirmation screen (#202)

When a user attempts to confirm an e-mail address, an exception is thrown because the db session is closed prior to logging.

The line db.session.close() has to move after the logging, otherwise the team parameters from the orm object are discarded and an exception is thrown.

Closing the session after logging, fixes the issue.

* Adding custom key types for challenges

* Separating out admin.py, adding challenge types

* Don't let truncate affect edit modal

* File uploads no longer refresh page (#207)

Closes (#180)

* Fixing missing import

* Fixing mistake in flag JSON response

* Removing compare_digest to support Python 2.7.6

* Fixing inconsistencies in standard challenge modal

* Passing submission input over to template js

* Handling cases where data can't be found in the DOM better

* Don't refresh modal if it's just a refresh operation

* Fixing solving challenges while scoreboard is public

Induce a redirect to make user login

* Adding missing js file and fixing migration

* Fixing some visual glitches and streamlining challenge creation

* Fixed hard coded upload directory (#206)
2017-03-03 00:36:00 -05:00
Kevin Chung 3022a7a01a Closes #213
* Fixes running CTFd under a folder
2017-03-02 20:28:17 -05:00
Kevin Chung fdb2c34d88 Testing branch (#211)
* Extracting key checking logic to make it more extensible

* Add missing keys __init__ file

* Adding logging access and errors to Dockerfile

* Use template inheritance for page.html (#198)

* Fix exception on cofirmation screen (#202)

When a user attempts to confirm an e-mail address, an exception is thrown because the db session is closed prior to logging.

The line db.session.close() has to move after the logging, otherwise the team parameters from the orm object are discarded and an exception is thrown.

Closing the session after logging, fixes the issue.

* Adding custom key types for challenges

* Separating out admin.py, adding challenge types

* Don't let truncate affect edit modal

* File uploads no longer refresh page (#207)

Closes (#180)

* Fixing missing import

* Fixing mistake in flag JSON response

* Removing compare_digest to support Python 2.7.6

* Fixing inconsistencies in standard challenge modal

* Passing submission input over to template js

* Handling cases where data can't be found in the DOM better

* Don't refresh modal if it's just a refresh operation

* Fixing solving challenges while scoreboard is public

Induce a redirect to make user login

* Adding missing js file and fixing migration

* Fixing some visual glitches and streamlining challenge creation
2017-02-24 21:46:25 -05:00
C0deH4cker 2e3df14764 Fix display of team websites with https:// prefixes (#209) 2017-02-24 13:31:53 -05:00
Kevin Chung 935027c55d Marking 1.0.0 (#196)
* Use <int:xxx> in routes to prevent some errors 500 (#192)

* Use first_or_404() to prevent some errors 500 (#193)

* Add a populating script for awards. (#191)

* Creating upload_file util

* Marking 1.0.0 in __init__ and starting database migrations

* Upgrading some more HTML

* Adding CHANGELOG.md
2017-01-24 23:06:16 -05:00
Kevin Chung 01cb189b22 Fixing scoping issues in awards rendering and not commiting .data (docker-compose) 2017-01-15 18:13:11 -05:00
Kevin Chung dc79f34509 Adding Reversing Module 2017-01-10 04:18:10 -05:00
Kevin Chung fa788fe3d0 Latest set of changes (#190)
* PEP 8 compliance (#183)

* Group imports: standard library, third party, local
* Remove unnecessary spaces
* Comments should start with a # and a single space

* Adding tests for GETs on user facing pages

* Adding more user facing tests

51% test coverage

* Fixes #182

* Cleaning up Pages

Fixes a bug with CSS updating
2017-01-10 03:35:48 -05:00
Kevin Chung 397eb95dd7 Adding test_user_login 2017-01-07 11:48:10 -05:00
Kevin Chung 28d8a02ec6 Starting to write tests
test_index
test_register_user
test_user_isnt_admin
2017-01-07 02:44:31 -05:00
Kevin Chung 0e5c7aa972 Closes #186 and fixes an issue with docker-compose 2017-01-06 18:20:56 -05:00
Kevin Chung 09398b2ab0 Changing to Ubuntu and docker-compose v2. Closes #185 2017-01-06 17:04:57 -05:00
Kevin Chung 6eee636893 Making file download button smaller 2016-12-26 20:19:19 -05:00