Skip to content

Commit

Permalink
modules.admin: api_config.py updates hashed_password for running inst…
Browse files Browse the repository at this point in the history
…ance after password change
  • Loading branch information
msinn committed Jun 21, 2024
1 parent 49c6ced commit 6b3cebe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/admin/api_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import json
import cherrypy

from lib.module import Modules
import lib.shyaml as shyaml

from .rest import RESTResource
Expand Down Expand Up @@ -245,6 +246,11 @@ def update(self, id=None):
# update etc/module.yaml with data from admin frontend
self.module_confdata = shyaml.yaml_load_roundtrip(os.path.join(self.etc_dir, 'module.yaml'))
self.update_configdict(self.module_confdata['http'], data, 'http')
self.mod_http = Modules.get_instance().get_module('http')
hashed_password = data.get('http', {}).get('data', {}).get('hashed_password', '')
if hashed_password is None:
hashed_password = ''
self.mod_http._hashed_password = hashed_password
self.update_configdict(self.module_confdata['admin'], data, 'admin')

if self.module_confdata.get('websocket', None) is None:
Expand Down

0 comments on commit 6b3cebe

Please sign in to comment.