Skip to content

Commit

Permalink
fix: jans-cli decode encrypted data if salt changed
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Nov 28, 2022
1 parent b7c07e1 commit 8213541
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions jans-cli-tui/cli_tui/cli/config_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,19 @@ def get_plugin_name_from_title(title):
if config['DEFAULT'].get(secret_key_str):
client_secret = config['DEFAULT'][secret_key_str]
elif config['DEFAULT'].get(secret_enc_key_str):
client_secret_enc = config['DEFAULT'][secret_enc_key_str]
client_secret = unobscure(client_secret_enc)
try:
client_secret_enc = config['DEFAULT'][secret_enc_key_str]
client_secret = unobscure(client_secret_enc)
except Exception:
pass

if 'access_token' in config['DEFAULT'] and config['DEFAULT']['access_token'].strip():
access_token = config['DEFAULT']['access_token']
elif 'access_token_enc' in config['DEFAULT'] and config['DEFAULT']['access_token_enc'].strip():
access_token = unobscure(config['DEFAULT']['access_token_enc'])
try:
access_token = unobscure(config['DEFAULT']['access_token_enc'])
except Exception:
pass

debug = config['DEFAULT'].get('debug')
log_dir = config['DEFAULT'].get('log_dir', log_dir)
Expand Down

0 comments on commit 8213541

Please sign in to comment.