Skip to content

Commit

Permalink
Eliminate security vulnerabilty and disable debug /console endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
jreed1701 committed Jan 3, 2024
1 parent b8b2432 commit 31b2a83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class DefaultConfig:
DEFAULT_INSTALL_PATH = f"/usr/local/share/{APP_NAME}"

# Flask specific configs
DEBUG = True
ENV = "development"
DEBUG = False
ENV = "production"
FLASK_RUN_HOST = "0.0.0.0"
FLASK_RUN_PORT = "5000"
FLASK_FORCE_AUTH = False # Leave as False except in testing.
Expand Down
7 changes: 6 additions & 1 deletion application/gui/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ def _create_backend(self) -> Flask:
def _spawn_server_on_thread(self):
self._server_thread = Thread(
target=lambda: self._globals._FLASK_APP.run(
host="0.0.0.0", port=5000, debug=True, use_reloader=False, threaded=True
host="0.0.0.0",
port=5000,
debug=False,
use_reloader=False,
threaded=True,
use_evalex=False
)
)
self._server_thread.daemon = True
Expand Down

0 comments on commit 31b2a83

Please sign in to comment.