Skip to content
Permalink
Browse files
Fix handleSSlError ignore saved errors
  • Loading branch information
troopa81 authored and nyalldawson committed Aug 17, 2021
1 parent 25b43f5 commit d175bbf8614f6f576d56546478a29a3d03d20577
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/app/qgsappsslerrorhandler.cpp
@@ -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 )
@@ -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();

0 comments on commit d175bbf

Please sign in to comment.