Skip to content

Commit

Permalink
[auth] Check for empty credentials instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 11, 2017
1 parent 5231ef6 commit 38a4397
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/wms/qgswmscapabilities.h
Expand Up @@ -501,12 +501,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 " + QString( "%1:%2" ).arg( mUserName, mPassword ).toAscii().toBase64() );
}

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

0 comments on commit 38a4397

Please sign in to comment.