Add do not download keys to config

This commit is contained in:
JonnyWong16 2022-01-16 11:22:07 -08:00
parent 81dc790a0c
commit 71d64a4b3f
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 5 additions and 2 deletions

View file

@ -222,6 +222,9 @@ _DO_NOT_IMPORT_KEYS = [
_DO_NOT_IMPORT_KEYS_DOCKER = [
'PLEXPY_AUTO_UPDATE', 'GIT_REMOTE', 'GIT_BRANCH'
]
_DO_NOT_DOWNLOAD_KEYS = [
'PMS_TOKEN', 'JWT_SECRET'
]
IS_IMPORTING = False
IMPORT_THREAD = None

View file

@ -4848,8 +4848,8 @@ class WebInterface(object):
try:
cfg = config.Config(config_copy)
cfg.PMS_TOKEN = ''
cfg.JWT_SECRET = ''
for key in config._DO_NOT_DOWNLOAD_KEYS:
setattr(cfg, key, '')
cfg.write()
except:
cherrypy.response.status = 500