Skip to content

Commit 770083b

Browse files
committed
Do not url encode passwords in SDN.
1 parent 85a95ad commit 770083b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/database/mariadb.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"encoding/json"
77
"fmt"
88
"log"
9-
"net/url"
109
"reflect"
1110
"strconv"
1211
"sync/atomic"
@@ -34,7 +33,7 @@ type SourceRelation struct {
3433

3534
// NewMariaDB create an instance of mariadb
3635
func NewMariaDB(username string, password string, host string, databaseName string, allowCleartextPassword bool) *MariaDB {
37-
db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@(%s)/%s?allowCleartextPasswords=%s", username, url.QueryEscape(password),
36+
db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@(%s)/%s?allowCleartextPasswords=%s", username, password,
3837
host, databaseName, strconv.FormatBool(allowCleartextPassword)))
3938
if err != nil {
4039
log.Fatal(err)

0 commit comments

Comments
 (0)