Skip to content

Commit

Permalink
user modify: dont log cli params and _put_data
Browse files Browse the repository at this point in the history
- passwords shouldn't be in debug.log, nor shown in any cli debugging
  output
- on the long run something should be done to easily exclude certain
  information from Click params info log and post/put info log
  • Loading branch information
JOJ0 committed Nov 29, 2020
1 parent e807bbf commit 87d5afd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synadm.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def user_modify(self, user_id, password, display_name, threepid, avatar_url,
if deactivation == 'activate':
data.update({"deactivated": False})
json_data = json.dumps(data)
return self._put(urlpart, json_data, log_put_data=True)
return self._put(urlpart, json_data, log_put_data=False)

def room_list(self, _from, limit, name, order_by, reverse):
urlpart = f'v1/rooms?from={_from}&limit={limit}'
Expand Down Expand Up @@ -737,7 +737,7 @@ def modify(ctx, user_id, password, password_prompt, display_name, threepid,
as argument.'''
synadm = Synapse_admin(ctx.obj['config'].user, ctx.obj['config'].token,
ctx.obj['config'].base_url, ctx.obj['config'].admin_path)
log.info(f'user modify options: {ctx.params}\n')
#log.info(f'user modify options: {ctx.params}\n')

# sanity checks that can't easily be handled by Click.
if password_prompt and password:
Expand Down

0 comments on commit 87d5afd

Please sign in to comment.