Be less strict on SSL: add an option instead?

This commit is contained in:
Benjamin Drieu 2022-03-21 12:10:05 +01:00 committed by Benjamin Drieu
parent d5f975ce44
commit e52a346369

View File

@ -52,14 +52,24 @@ class GenericServer {
buildURL ( )
{
if ( ! this._settings )
// if ( ! this._settings )
this._settings = Preferences.getAccountSettings ( this._server );
if ( this.type != this._settings.get_string ( "type" ) ||
this.username != this._settings.get_string ( "username" ) ||
this.strict_ssl != this._settings.get_boolean ( "strict-ssl" ) ||
this.name != this._settings.get_string ( "name" ) ||
this.password != this._settings.get_string ( "password" ) ||
this.urlcgi != this._settings.get_string ( "urlcgi" ) )
{
this.type = this._settings.get_string ( "type" );
this.username = this._settings.get_string ( "username" );
this.strict_ssl = this._settings.get_boolean ( "strict-ssl" );
this.name = this._settings.get_string ( "name" );
this.password = this._settings.get_string ( "password" );
this.urlcgi = this._settings.get_string ( "urlcgi" );
this._httpSession = null;
}
// log ( 'monito server >>> ' + this._server );
// log ( 'monito name >>> ' + this.name );
@ -73,6 +83,7 @@ class GenericServer {
{
if ( this._httpSession == null ) {
this._httpSession = new Soup.Session();
this._httpSession.ssl_strict = this.strict_ssl;
this._httpSession.user_agent = Me.metadata.uuid;
}
}