Skip to content

Commit

Permalink
Testing branch (CTFd#211)
Browse files Browse the repository at this point in the history
* 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 (CTFd#198)

* Fix exception on cofirmation screen (CTFd#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 (CTFd#207)

Closes (CTFd#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
  • Loading branch information
ColdHeat authored Feb 25, 2017
1 parent 2e3df14 commit fdb2c34
Show file tree
Hide file tree
Showing 47 changed files with 2,247 additions and 1,315 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,5 @@ target/
.idea/
CTFd/static/uploads
CTFd/uploads
CTFd/plugins
.data/
.ctfd_secret_key
14 changes: 11 additions & 3 deletions CTFd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from flask import Flask
from jinja2 import FileSystemLoader
from sqlalchemy.engine.url import make_url
from sqlalchemy.exc import OperationalError
from sqlalchemy.exc import OperationalError, ProgrammingError
from sqlalchemy_utils import database_exists, create_database

from utils import get_config, set_config, cache, migrate, migrate_upgrade
Expand Down Expand Up @@ -60,15 +60,15 @@ def create_app(config='CTFd.config.Config'):
if version and (StrictVersion(version) < StrictVersion(__version__)): ## Upgrading from an older version of CTFd
migrate_upgrade()
set_config('ctf_version', __version__)

if not get_config('ctf_theme'):
set_config('ctf_theme', 'original')

from CTFd.views import views
from CTFd.challenges import challenges
from CTFd.scoreboard import scoreboard
from CTFd.auth import auth
from CTFd.admin import admin
from CTFd.admin import admin, admin_statistics, admin_challenges, admin_pages, admin_scoreboard, admin_containers, admin_keys, admin_teams
from CTFd.utils import init_utils, init_errors, init_logs

init_utils(app)
Expand All @@ -79,7 +79,15 @@ def create_app(config='CTFd.config.Config'):
app.register_blueprint(challenges)
app.register_blueprint(scoreboard)
app.register_blueprint(auth)

app.register_blueprint(admin)
app.register_blueprint(admin_statistics)
app.register_blueprint(admin_challenges)
app.register_blueprint(admin_teams)
app.register_blueprint(admin_scoreboard)
app.register_blueprint(admin_keys)
app.register_blueprint(admin_containers)
app.register_blueprint(admin_pages)

from CTFd.plugins import init_plugins

Expand Down
Loading

0 comments on commit fdb2c34

Please sign in to comment.