mirror of https://github.com/JohnHammond/CTFd.git
Closes #186 and fixes an issue with docker-compose
parent
09398b2ab0
commit
0e5c7aa972
|
@ -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[]')
|
||||
|
|
Loading…
Reference in New Issue