Improving code style and some security issues

This commit is contained in:
Denis-Cosmin Nutiu 2017-05-27 21:36:49 +03:00
parent fa7b003549
commit 56d75c925c
2 changed files with 4 additions and 3 deletions

View file

@ -17,6 +17,7 @@
"""
import os
import logging
import tempfile
from logging.handlers import SysLogHandler
from src.models import db
@ -34,7 +35,7 @@ class Config:
# Server Settings
ADMIN_EMAIL = "metonymy@fedoraproject.org"
ADMIN_NAME = "Metonymy"
BIND_IP = "0.0.0.0"
BIND_IP = ""
BIND_PORT = 5000
CACHE_TYPE = "memcached"
CACHE_DEFAULT_TIMEOUT = 60
@ -55,7 +56,7 @@ class Config:
class DevelopmentConfig(Config):
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'database.sqlite')
CACHE_TYPE = "filesystem"
CACHE_DIR = "/tmp"
CACHE_DIR = tempfile.gettempdir()
@staticmethod
def init_app(app):

View file

@ -52,7 +52,7 @@ def get_env_variable(variable, fallback):
"""
Will try to retrieve the environment variable from the system and if it fails
it returns the fallback value.
Args:
variable: The environment variable that should be retrieved
fallback: The default return value in case the environment variable is not retrieved