mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 13:41:15 -07:00
Remove tokens from downloaded config
This commit is contained in:
parent
ce0cdf9ce6
commit
c35cbb06e2
1 changed files with 12 additions and 1 deletions
|
@ -4838,13 +4838,24 @@ class WebInterface(object):
|
|||
def download_config(self, **kwargs):
|
||||
""" Download the Tautulli configuration file. """
|
||||
config_file = config.FILENAME
|
||||
config_copy = os.path.join(plexpy.CONFIG.CACHE_DIR, config_file)
|
||||
|
||||
try:
|
||||
plexpy.CONFIG.write()
|
||||
shutil.copyfile(plexpy.CONFIG_FILE, config_copy)
|
||||
except:
|
||||
pass
|
||||
|
||||
return serve_download(plexpy.CONFIG_FILE, name=config_file)
|
||||
try:
|
||||
cfg = config.Config(config_copy)
|
||||
cfg.PMS_TOKEN = ''
|
||||
cfg.JWT_SECRET = ''
|
||||
cfg.write()
|
||||
except:
|
||||
cherrypy.response.status = 500
|
||||
return 'Error downloading config. Check the logs.'
|
||||
|
||||
return serve_download(config_copy, name=config_file)
|
||||
|
||||
@cherrypy.expose
|
||||
@requireAuth(member_of("admin"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue