* Changing to a new plugin oriented challenge type plugin and fixing extra width on admin chal description

* Add window.challenge.submit, renderSubmissionResponse, and csrf_nonce

* Update admin side renderer calls

* Updating to Flask 1.0 and adding files for flask run

* Adding a preliminary case-insensitive key

* Adding case insensitive keys

* Adding CTF Logo

* Reducing the amount of team information shown on the main page

* Add better base64 helpers

* Switch from button to badge

* Rudimentary solve checking from admin panel

* Refine admin chals solves view & fix PEP8

* Compare base64 encoded data with bytestring

* Removing need to urlencode/urldecode in base64 wrappers

* Adding decorator documentation

* Randomly order tests & add test for case_insensitive flags

* Add regex flag case_insensitive test

* Add tests for /admin/chal/1/solves and ctf_logo
This commit is contained in:
Kevin Chung
2018-05-03 18:04:39 -04:00
committed by GitHub
parent 9c812ad52e
commit 36c83b59bc
40 changed files with 695 additions and 429 deletions

View File

@@ -208,7 +208,7 @@ def test_admins_can_delete_challenges():
def test_admins_can_delete_challenges_with_extras():
""""Test that admins can delete challenges that have a hint"""
"""Test that admins can delete challenges that have a hint"""
app = create_ctfd()
with app.app_context():
client = login_as_user(app, name="admin", password="password")
@@ -274,6 +274,24 @@ def test_admin_chal_detail_returns_proper_data():
destroy_ctfd(app)
def test_admin_load_chal_solves():
app = create_ctfd()
with app.app_context():
client = login_as_user(app, name="admin", password="password")
chal1 = gen_challenge(app.db)
flag1 = gen_flag(app.db, chal=chal1.id, flag='flag')
chal1_id = chal1.id
gen_solve(app.db, teamid=1, chalid=chal1_id)
r = client.get('/admin/chal/1/solves')
data = r.get_data(as_text=True)
assert json.loads(data)
destroy_ctfd(app)
def test_admins_can_create_teams():
'''Test that admins can create new teams'''
app = create_ctfd()