Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Issue#56 - Escape special characters in MongoDB password. #60

Merged
merged 1 commit into from
Jan 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/models/dbconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package models

import (
"errors"
"net/url"
"time"

"github.com/google/uuid"
Expand Down Expand Up @@ -46,6 +47,9 @@ func NewDBConnection(projectID string, name string, dbtype string, dbscheme, dbh
if !utils.ContainsString([]string{"mongodb", "mongodb+srv"}, dbscheme) {
return nil, errors.New("invalid dbscheme")
}

dbpassword = url.QueryEscape(dbpassword)

} else {
return nil, errors.New("dbtype is not correct")
}
Expand Down