Skip to content

Commit

Permalink
Fix handleSSlError ignore saved errors
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 authored and github-actions[bot] committed Aug 4, 2021
1 parent 2a008a8 commit bdb13df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/qgsappsslerrorhandler.cpp
Expand Up @@ -41,7 +41,6 @@ void QgsAppSslErrorHandler::handleSslErrors( QNetworkReply *reply, const QList<Q
QgsDebugMsg( QStringLiteral( "Ignored SSL errors cached item found, ignoring errors if they match for %1" ).arg( hostport ) );
const QSet<QSslError::SslError> &errenums( errscache.value( dgsthostport ) );
bool ignore = !errenums.isEmpty();
int errmatched = 0;
if ( ignore )
{
for ( const QSslError &error : errors )
Expand All @@ -51,11 +50,10 @@ void QgsAppSslErrorHandler::handleSslErrors( QNetworkReply *reply, const QList<Q

bool errmatch = errenums.contains( error.error() );
ignore = ignore && errmatch;
errmatched += errmatch ? 1 : 0;
}
}

if ( ignore && errenums.size() == errmatched )
if ( ignore )
{
QgsDebugMsg( QStringLiteral( "Errors matched cached item's, ignoring all for %1" ).arg( hostport ) );
reply->ignoreSslErrors();
Expand Down

0 comments on commit bdb13df

Please sign in to comment.