mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-28 16:27:23 -04:00
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:
commit
49167e64b0
1 changed files with 7 additions and 0 deletions
|
@ -178,12 +178,19 @@ def set_gui_mode():
|
||||||
def debug_mode():
|
def debug_mode():
|
||||||
"""
|
"""
|
||||||
Turn on debugging mode, which will log flask errors to a debug file.
|
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()
|
temp_dir = tempfile.gettempdir()
|
||||||
log_handler = logging.FileHandler(
|
log_handler = logging.FileHandler(
|
||||||
os.path.join(temp_dir, 'onionshare_server.log'))
|
os.path.join(temp_dir, 'onionshare_server.log'))
|
||||||
log_handler.setLevel(logging.WARNING)
|
log_handler.setLevel(logging.WARNING)
|
||||||
app.logger.addHandler(log_handler)
|
app.logger.addHandler(log_handler)
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
def check_slug_candidate(slug_candidate, slug_compare=None):
|
def check_slug_candidate(slug_candidate, slug_compare=None):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue