Skip to content

Commit

Permalink
Fix wms autorization logic
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Mar 25, 2021
1 parent 1ba3c26 commit 8379adb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsdatasourceuri.cpp
Expand Up @@ -635,7 +635,7 @@ void QgsDataSourceUri::setEncodedUri( const QByteArray &uri )
mAuthConfigId.clear();

QUrl url;
url.setQuery( QString::fromUtf8( uri ) );
url.setQuery( QString::fromLatin1( uri ) );
const QUrlQuery query( url );

const auto constQueryItems = query.queryItems( QUrl::ComponentFormattingOption::FullyDecoded );
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmscapabilities.h
Expand Up @@ -764,7 +764,7 @@ struct QgsWmsAuthorization
}
else if ( !mUserName.isEmpty() || !mPassword.isEmpty() )
{
request.setRawHeader( "Authorization", "Basic " + QStringLiteral( "%1:%2" ).arg( mUserName, mPassword ).toLatin1().toBase64() );
request.setRawHeader( "Authorization", "Basic " + QStringLiteral( "%1:%2" ).arg( mUserName, mPassword ).toUtf8().toBase64() );
}

if ( !mReferer.isEmpty() )
Expand Down

0 comments on commit 8379adb

Please sign in to comment.