Commit Graph

15 Commits (7a7595cf033b9198045a9daed79944d2992f4f49)

Author SHA1 Message Date
Kevin Chung 6833378c36
Format all the things (#991)
* Format Javascript and CSS files with `prettier`: `prettier --write 'CTFd/themes/**/*'`
* Format Python with `black`: `black CTFd` & `black tests`
* Travis now uses xenial instead of trusty.
2019-05-11 21:09:37 -04:00
Kevin Chung 3d23ece370
Fix freeze time regressions (#989)
* Fix freeze time regressions in 2.x
* Make `/api/v1/[users,teams]/[me,id]/[solves,fails,awards]` endpoints load as admin to load all rows and bypass freeze
    * Closes #988
* Make `/api/v1/challenges/[id]/solves` respect freeze time. `/api/v1/challenges/[id]/solves?preview=true` is exposed for admins to see solves as a user would. 
    * Closes #986
2019-05-11 00:18:56 -04:00
Kevin Chung 4e80b514f4 Add plugin wrappers for plugin related utils functions (#410) 2017-10-14 17:17:06 -04:00
Kevin Chung 92b7ca06ca Add Vagrant with docker support (#285) (#355)
* Add Vagrantfile for development with an Ubuntu base box
* Add Docker support to Vagrant VM
2017-08-20 19:31:32 -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 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
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 5821bad388 Seperating admin and original themes
Also fixing a bug in setting end times
2016-11-19 18:38:45 -05:00
Kevin Chung 52ad396db4 Adding file handler 2016-11-05 00:54:21 -04:00
Kevin Chung b05f6152d3 Custom themes (#131)
* Adding preliminary custom themes

* Fixing Windows compatibility

https://github.com/pallets/jinja/issues/411

* Fixing template reloading and adding UI to change themes

* Explicitly closing db connections

* Themes now have custom static folders

* Closes #128
2016-07-22 02:46:14 -04:00
CodeKevin 81345dc6d2 Auto-generate secret key and fixing challenge modal 2015-11-17 19:46:44 -05:00
CodeKevin ac83c8a576 Fixing DOM XSS issues, upload issues, and usability issues 2015-03-16 16:03:58 -04:00
CodeKevin 7642aeb1e5 Starting DO integration 2015-01-24 00:48:41 -05:00
CodeKevin 376c90189b CTFd code push 2015-01-01 00:45:25 -05:00
Kevin Chung 20183dd3c9 Initial commit 2015-01-01 00:36:56 -05:00