Permalink
Browse files

Fix authentication for certain admin actions

  • Loading branch information...
ajvpot committed Sep 15, 2015
1 parent 310d6b8 commit 9578355143d7af675fc4776b0f2de802be91e261
Showing with 3 additions and 0 deletions.
  1. +3 −0 CTFd/admin.py
View
@@ -547,6 +547,7 @@ def admin_fails(teamid='all'):
@admin.route('/admin/chal/new', methods=['POST'])
@admins_only
def admin_create_chal():
files = request.files.getlist('files[]')
@@ -581,6 +582,7 @@ def admin_create_chal():
@admin.route('/admin/chal/delete', methods=['POST'])
@admins_only
def admin_delete_chal():
challenge = Challenges.query.filter_by(id=request.form['id']).first()
if challenge:
@@ -600,6 +602,7 @@ def admin_delete_chal():
@admin.route('/admin/chal/update', methods=['POST'])
@admins_only
def admin_update_chal():
challenge = Challenges.query.filter_by(id=request.form['id']).first()
challenge.name = request.form['name']

0 comments on commit 9578355

Please sign in to comment.