Merge pull request #838 from micahflee/837_hotfix_cve-2018-19960

When debug mode is enabled, don't log flask errors to disk
This commit is contained in:
Micah Lee 2018-12-11 12:50:40 -08:00 committed by GitHub
commit 4da5e15581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,12 +178,19 @@ def set_gui_mode():
def debug_mode():
"""
Turn on debugging mode, which will log flask errors to a debug file.
This is commented out (it's only needed for debugging, and not needed
for OnionShare 1.3.2) as a hotfix to resolve this issue:
https://github.com/micahflee/onionshare/issues/837
"""
pass
"""
temp_dir = tempfile.gettempdir()
log_handler = logging.FileHandler(
os.path.join(temp_dir, 'onionshare_server.log'))
log_handler.setLevel(logging.WARNING)
app.logger.addHandler(log_handler)
"""
def check_slug_candidate(slug_candidate, slug_compare=None):