Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[auth] Check for empty credentials instead of null
  • Loading branch information
elpaso committed Oct 6, 2017
1 parent a7f132b commit a4a33df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/wms/qgswmscapabilities.h
Expand Up @@ -502,12 +502,12 @@ struct QgsWmsAuthorization
{
return QgsAuthManager::instance()->updateNetworkRequest( request, mAuthCfg );
}
else if ( !mUserName.isNull() || !mPassword.isNull() )
else if ( !mUserName.isEmpty() || !mPassword.isEmpty() )
{
request.setRawHeader( "Authorization", "Basic " + QStringLiteral( "%1:%2" ).arg( mUserName, mPassword ).toLatin1().toBase64() );
}

if ( !mReferer.isNull() )
if ( !mReferer.isEmpty() )
{
request.setRawHeader( "Referer", QStringLiteral( "%1" ).arg( mReferer ).toLatin1() );
}
Expand Down

0 comments on commit a4a33df

Please sign in to comment.