Commit c59d8b79 authored by sim's avatar sim

[SECURITY FIX] Potential database password leak while in DEBUG mode

parent 4d22817f
...@@ -18,7 +18,8 @@ from gargantext import settings, models ...@@ -18,7 +18,8 @@ from gargantext import settings, models
# this is the Alembic Config object, which provides # this is the Alembic Config object, which provides
# access to the values within the .ini file in use. # access to the values within the .ini file in use.
config = context.config config = context.config
config.set_main_option("sqlalchemy.url", settings.DATABASES['default']['URL']) config.set_main_option("sqlalchemy.url",
settings.DATABASES['default']['SECRET_URL'])
# Interpret the config file for Python logging. # Interpret the config file for Python logging.
# This line sets up loggers basically. # This line sets up loggers basically.
......
...@@ -10,7 +10,7 @@ from sqlalchemy import delete ...@@ -10,7 +10,7 @@ from sqlalchemy import delete
def get_engine(): def get_engine():
from sqlalchemy import create_engine from sqlalchemy import create_engine
return create_engine( settings.DATABASES['default']['URL'] return create_engine( settings.DATABASES['default']['SECRET_URL']
, use_native_hstore = True , use_native_hstore = True
, json_serializer = json_dumps , json_serializer = json_dumps
, pool_size=20, max_overflow=0 , pool_size=20, max_overflow=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment