mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-21 15:54:21 +01:00
Auth Improvments (#746)
* Create generic get_errors, get_infos; add MLC OAuth settings in config * Use new get_errors function
This commit is contained in:
@@ -9,6 +9,7 @@ from CTFd.utils.user import get_current_user, authed, get_ip
|
||||
from CTFd.utils.dates import unix_time_to_utc
|
||||
from CTFd.utils.crypto import verify_password
|
||||
from CTFd.utils.decorators.visibility import check_account_visibility, check_score_visibility
|
||||
from CTFd.utils.helpers import get_errors, get_infos
|
||||
|
||||
teams = Blueprint('teams', __name__)
|
||||
|
||||
@@ -65,7 +66,7 @@ def new():
|
||||
elif request.method == 'POST':
|
||||
teamname = request.form.get('name')
|
||||
passphrase = request.form.get('password', '').strip()
|
||||
errors = []
|
||||
errors = get_errors()
|
||||
|
||||
user = get_current_user()
|
||||
|
||||
@@ -127,7 +128,7 @@ def private():
|
||||
@check_score_visibility
|
||||
@require_team_mode
|
||||
def public(team_id):
|
||||
errors = []
|
||||
errors = get_errors()
|
||||
team = Teams.query.filter_by(id=team_id).first_or_404()
|
||||
solves = team.get_solves()
|
||||
awards = team.get_awards()
|
||||
|
||||
Reference in New Issue
Block a user