Fix access to unreleased challenges through /chals/<id> endpoint (#689)

This commit is contained in:
Benno Evers
2018-10-06 10:29:30 +02:00
committed by Kevin Chung
parent 14ea952a2a
commit 41933cc367

View File

@@ -133,6 +133,8 @@ def chal_view(chal_id):
teamid = session.get('id')
chal = Challenges.query.filter_by(id=chal_id).first_or_404()
if chal.hidden:
abort(404)
chal_class = get_chal_class(chal.type)
tags = [tag.tag for tag in Tags.query.add_columns('tag').filter_by(chal=chal.id).all()]