mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[auth] Check for empty credentials instead of null
This commit is contained in:
parent
a7f132bc87
commit
a4a33dff75
@ -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() );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user