Skip to content

Commit a4a33df

Browse files
committedOct 6, 2017
[auth] Check for empty credentials instead of null
1 parent a7f132b commit a4a33df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/providers/wms/qgswmscapabilities.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,12 +502,12 @@ struct QgsWmsAuthorization
502502
{
503503
return QgsAuthManager::instance()->updateNetworkRequest( request, mAuthCfg );
504504
}
505-
else if ( !mUserName.isNull() || !mPassword.isNull() )
505+
else if ( !mUserName.isEmpty() || !mPassword.isEmpty() )
506506
{
507507
request.setRawHeader( "Authorization", "Basic " + QStringLiteral( "%1:%2" ).arg( mUserName, mPassword ).toLatin1().toBase64() );
508508
}
509509

510-
if ( !mReferer.isNull() )
510+
if ( !mReferer.isEmpty() )
511511
{
512512
request.setRawHeader( "Referer", QStringLiteral( "%1" ).arg( mReferer ).toLatin1() );
513513
}

0 commit comments

Comments
 (0)
Please sign in to comment.