Skip to content

Commit

Permalink
fix(secure): do not override password and username (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoseph Maguire authored Oct 27, 2020
1 parent 94075d8 commit 298dbb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function connect (brokerUrl, opts) {
opts.host = parsed.host
opts.protocol = parsed.protocol
opts.port = Number(parsed.port) || null
opts.username = parsed.username
opts.password = parsed.password
opts.username = opts.username || parsed.username
opts.password = opts.password || parsed.password
opts.searchParams = parsed.searchParams
opts.protocol = opts.protocol.replace(/:$/, '')
}
Expand Down

0 comments on commit 298dbb2

Please sign in to comment.