Skip to content

Commit 906766d

Browse files
author
Patrick Harvey
committed
decode password on connection
1 parent 50b61df commit 906766d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/oracle/connection/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,15 @@ impl OciConnection {
698698
let password = url
699699
.password()
700700
.ok_or_else(|| ConnectionError::InvalidConnectionUrl("Password not set".into()))?;
701+
702+
let password = percent_encoding::percent_decode_str(password)
703+
.decode_utf8()
704+
.map_err(|_| {
705+
ConnectionError::InvalidConnectionUrl(
706+
"Password could not be percent decoded".into(),
707+
)
708+
})?;
709+
701710
let host = url
702711
.host_str()
703712
.ok_or_else(|| ConnectionError::InvalidConnectionUrl("Hostname not set".into()))?;

0 commit comments

Comments
 (0)