Skip to content

Commit

Permalink
chore: trim space/newline around connection username,password and url
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Oct 18, 2024
1 parent a06b6f3 commit cac51ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions context/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ func HydrateConnection(ctx Context, connection *models.Connection) (*models.Conn
}
}

// Remove newlines and spaces around username,password & url
connection.URL = strings.TrimSpace(connection.URL)
connection.Username = strings.TrimSpace(connection.Username)
connection.Password = strings.TrimSpace(connection.Password)

domain := ""
parts := strings.Split(connection.Username, "@")
if len(parts) == 2 {
Expand Down

0 comments on commit cac51ab

Please sign in to comment.