Skip to content

Commit fdb2c34

Browse files
authored
Testing branch (CTFd#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 (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
1 parent 2e3df14 commit fdb2c34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2247
-1315
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,5 @@ target/
6060
.idea/
6161
CTFd/static/uploads
6262
CTFd/uploads
63-
CTFd/plugins
6463
.data/
6564
.ctfd_secret_key

CTFd/__init__.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from flask import Flask
55
from jinja2 import FileSystemLoader
66
from sqlalchemy.engine.url import make_url
7-
from sqlalchemy.exc import OperationalError
7+
from sqlalchemy.exc import OperationalError, ProgrammingError
88
from sqlalchemy_utils import database_exists, create_database
99

1010
from utils import get_config, set_config, cache, migrate, migrate_upgrade
@@ -60,15 +60,15 @@ def create_app(config='CTFd.config.Config'):
6060
if version and (StrictVersion(version) < StrictVersion(__version__)): ## Upgrading from an older version of CTFd
6161
migrate_upgrade()
6262
set_config('ctf_version', __version__)
63-
63+
6464
if not get_config('ctf_theme'):
6565
set_config('ctf_theme', 'original')
6666

6767
from CTFd.views import views
6868
from CTFd.challenges import challenges
6969
from CTFd.scoreboard import scoreboard
7070
from CTFd.auth import auth
71-
from CTFd.admin import admin
71+
from CTFd.admin import admin, admin_statistics, admin_challenges, admin_pages, admin_scoreboard, admin_containers, admin_keys, admin_teams
7272
from CTFd.utils import init_utils, init_errors, init_logs
7373

7474
init_utils(app)
@@ -79,7 +79,15 @@ def create_app(config='CTFd.config.Config'):
7979
app.register_blueprint(challenges)
8080
app.register_blueprint(scoreboard)
8181
app.register_blueprint(auth)
82+
8283
app.register_blueprint(admin)
84+
app.register_blueprint(admin_statistics)
85+
app.register_blueprint(admin_challenges)
86+
app.register_blueprint(admin_teams)
87+
app.register_blueprint(admin_scoreboard)
88+
app.register_blueprint(admin_keys)
89+
app.register_blueprint(admin_containers)
90+
app.register_blueprint(admin_pages)
8391

8492
from CTFd.plugins import init_plugins
8593

0 commit comments

Comments
 (0)