Skip to content

Commit

Permalink
Merge pull request hyperledger-indy#2392 from Nova-Scotia-Digital-Ser…
Browse files Browse the repository at this point in the history
…vice/master

encode postgres account name to work with azure to address Issue hyperledger-indy#2388
  • Loading branch information
ianco authored May 25, 2021
2 parents e80e709 + 5091bbe commit 794ad8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions experimental/plugins/postgres_storage/src/postgres_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ impl PostgresStorageType {
let mut url_base = "postgresql://".to_owned();

match credentials.admin_account {
Some(ref account) => url_base.push_str(&account[..]),
Some(ref account) =>url_base.push_str(&utf8_percent_encode(&account[..], &NON_ALPHANUMERIC).to_string()),
None => ()
}
url_base.push_str(":");
Expand All @@ -1052,7 +1052,7 @@ impl PostgresStorageType {

fn _base_postgres_url(config: &PostgresConfig, credentials: &PostgresCredentials) -> String {
let mut url_base = "postgresql://".to_owned();
url_base.push_str(&credentials.account[..]);
url_base.push_str(&utf8_percent_encode(&credentials.account[..], &NON_ALPHANUMERIC).to_string());
url_base.push_str(":");
url_base.push_str(&utf8_percent_encode(&credentials.password[..], &NON_ALPHANUMERIC).to_string());
url_base.push_str("@");
Expand Down

0 comments on commit 794ad8a

Please sign in to comment.