File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Carlos Nieto <jose.carlos at menteslibres.net>
18
18
Chris Moos <chris at tech9computers.com>
19
19
Daniel Nichter <nil at codenode.com>
20
20
Daniël van Eeden <git at myname.nl>
21
+ Dave Protasowski <dprotaso at gmail.com>
21
22
DisposaBoy <disposaboy at dby.me>
22
23
Egor Smolyakov <egorsmkv at gmail.com>
23
24
Frederick Mayle <frederickmayle at gmail.com>
@@ -46,6 +47,7 @@ Nicola Peduzzi <thenikso at gmail.com>
46
47
Olivier Mengué <dolmen at cpan.org>
47
48
Paul Bonser <misterpib at gmail.com>
48
49
Peter Schultz <peter.schultz at classmarkets.com>
50
+ Rebecca Chin <rchin at pivotal.io>
49
51
Runrioter Wung <runrioter at gmail.com>
50
52
Soroush Pour <me at soroushjp.com>
51
53
Stan Putrya <root.vagner at gmail.com>
@@ -60,3 +62,4 @@ Zhenye Xie <xiezhenye at gmail.com>
60
62
Barracuda Networks, Inc.
61
63
Google Inc.
62
64
Stripe Inc.
65
+ Pivotal Inc.
Original file line number Diff line number Diff line change @@ -511,6 +511,8 @@ func parseDSNParams(cfg *Config, params string) (err error) {
511
511
}
512
512
513
513
if tlsConfig , ok := tlsConfigRegister [name ]; ok {
514
+ tlsConfig = tlsConfig .Clone ()
515
+
514
516
if len (tlsConfig .ServerName ) == 0 && ! tlsConfig .InsecureSkipVerify {
515
517
host , _ , err := net .SplitHostPort (cfg .Addr )
516
518
if err == nil {
Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ func TestDSNWithCustomTLS(t *testing.T) {
159
159
t .Error (err .Error ())
160
160
} else if cfg .tls .ServerName != name {
161
161
t .Errorf ("did not get the correct ServerName (%s) parsing DSN (%s)." , name , tst )
162
+ } else if tlsCfg .ServerName != "" {
163
+ t .Errorf ("tlsCfg was mutated ServerName (%s) should be empty parsing DSN (%s)." , name , tst )
162
164
}
163
165
164
166
DeregisterTLSConfig ("utils_test" )
You can’t perform that action at this time.
0 commit comments