Password is not returned in smtp settings

This commit is contained in:
Ozzie Isaacs 2023-07-09 10:23:56 +02:00
parent fdd1410b06
commit a256bd5260
3 changed files with 6 additions and 4 deletions

View File

@ -1296,7 +1296,8 @@ def update_mailsettings():
else: else:
_config_int(to_save, "mail_port") _config_int(to_save, "mail_port")
_config_int(to_save, "mail_use_ssl") _config_int(to_save, "mail_use_ssl")
_config_string(to_save, "mail_password_e") if "mail_password_e" in to_save:
_config_string(to_save, "mail_password_e")
_config_int(to_save, "mail_size", lambda y: int(y) * 1024 * 1024) _config_int(to_save, "mail_size", lambda y: int(y) * 1024 * 1024)
config.mail_server = to_save.get('mail_server', "").strip() config.mail_server = to_save.get('mail_server', "").strip()
config.mail_from = to_save.get('mail_from', "").strip() config.mail_from = to_save.get('mail_from', "").strip()
@ -1780,7 +1781,8 @@ def _configuration_update_helper():
# Goodreads configuration # Goodreads configuration
_config_checkbox(to_save, "config_use_goodreads") _config_checkbox(to_save, "config_use_goodreads")
_config_string(to_save, "config_goodreads_api_key") _config_string(to_save, "config_goodreads_api_key")
_config_string(to_save, "config_goodreads_api_secret_e") if "config_goodreads_api_secret_e" in to_save:
_config_string(to_save, "config_goodreads_api_secret_e")
if services.goodreads_support: if services.goodreads_support:
services.goodreads_support.connect(config.config_goodreads_api_key, services.goodreads_support.connect(config.config_goodreads_api_key,
config.config_goodreads_api_secret_e, config.config_goodreads_api_secret_e,

View File

@ -160,7 +160,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="config_goodreads_api_secret_e">{{_('Goodreads API Secret')}}</label> <label for="config_goodreads_api_secret_e">{{_('Goodreads API Secret')}}</label>
<input type="password" class="form-control" id="config_goodreads_api_secret_e" name="config_goodreads_api_secret_e" value="{% if config.config_goodreads_api_secret_e != None %}{{ config.config_goodreads_api_secret_e }}{% endif %}" autocomplete="off"> <input type="password" class="form-control" id="config_goodreads_api_secret_e" name="config_goodreads_api_secret_e" value="" autocomplete="off">
</div> </div>
</div> </div>
{% endif %} {% endif %}

View File

@ -49,7 +49,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="mail_password_e">{{_('SMTP Password')}}</label> <label for="mail_password_e">{{_('SMTP Password')}}</label>
<input type="password" class="form-control" name="mail_password_e" id="mail_password_e" value="{{content.mail_password_e}}"> <input type="password" class="form-control" name="mail_password_e" id="mail_password_e" value="">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="mail_from">{{_('From Email')}}</label> <label for="mail_from">{{_('From Email')}}</label>