Merge pull request #753 from shreyamalviya/config-reset-bug

Preserves ATT&CK config order on clicking 'Reset to defaults'
This commit is contained in:
Shay Nehmad 2020-08-01 17:37:56 +03:00 committed by GitHub
commit 81f58378ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ def init_app_config(app, mongo_url):
# deciding to reset credentials and then still logging in with the old JWT. # deciding to reset credentials and then still logging in with the old JWT.
app.config['JWT_SECRET_KEY'] = str(uuid.uuid4()) app.config['JWT_SECRET_KEY'] = str(uuid.uuid4())
# By default, Flask sorts keys of JSON objects alphabetically, which messes with the ATT&CK matrix in the
# configuration. See https://flask.palletsprojects.com/en/1.1.x/config/#JSON_SORT_KEYS.
app.config['JSON_SORT_KEYS'] = False
def init_app_services(app): def init_app_services(app):
init_jwt(app) init_jwt(app)