Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correctly decode password when decoding postgres/mssql uris
  • Loading branch information
nyalldawson committed Mar 26, 2020
1 parent 34e3634 commit d7e7d5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/providers/mssql/qgsmssqlprovider.cpp
Expand Up @@ -2435,6 +2435,8 @@ QVariantMap QgsMssqlProviderMetadata::decodeUri( const QString &uri )
uriParts[ QStringLiteral( "service" ) ] = dsUri.service();
if ( ! dsUri.username().isEmpty() )
uriParts[ QStringLiteral( "username" ) ] = dsUri.username();
if ( ! dsUri.password().isEmpty() )
uriParts[ QStringLiteral( "password" ) ] = dsUri.password();

// Supported?
//if ( ! dsUri.authConfigId().isEmpty() )
Expand Down
2 changes: 2 additions & 0 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -5367,6 +5367,8 @@ QVariantMap QgsPostgresProviderMetadata::decodeUri( const QString &uri )
uriParts[ QStringLiteral( "service" ) ] = dsUri.service();
if ( ! dsUri.username().isEmpty() )
uriParts[ QStringLiteral( "username" ) ] = dsUri.username();
if ( ! dsUri.password().isEmpty() )
uriParts[ QStringLiteral( "password" ) ] = dsUri.password();
if ( ! dsUri.authConfigId().isEmpty() )
uriParts[ QStringLiteral( "authcfg" ) ] = dsUri.authConfigId();
if ( dsUri.wkbType() != QgsWkbTypes::Type::Unknown )
Expand Down

0 comments on commit d7e7d5d

Please sign in to comment.