mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Closes #186 and fixes an issue with docker-compose
This commit is contained in:
@@ -40,6 +40,8 @@ def create_app(config='CTFd.config'):
|
||||
db.create_all()
|
||||
except OperationalError:
|
||||
db.create_all()
|
||||
except ProgrammingError: ## Database already exists
|
||||
pass
|
||||
else:
|
||||
db.create_all()
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ def delete_container(container_id):
|
||||
@admins_only
|
||||
def new_container():
|
||||
name = request.form.get('name')
|
||||
if set(name) <= set('abcdefghijklmnopqrstuvwxyz0123456789-_'):
|
||||
if not set(name) <= set('abcdefghijklmnopqrstuvwxyz0123456789-_'):
|
||||
return redirect(url_for('admin.list_container'))
|
||||
buildfile = request.form.get('buildfile')
|
||||
files = request.files.getlist('files[]')
|
||||
|
||||
Reference in New Issue
Block a user