Merge pull request #5744 from ToolJet/main

Merge main to develop for v2.2.2
This commit is contained in:
Midhun G S 2023-03-14 12:10:35 +05:30 committed by GitHub
commit 9ccdf05cca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3024 additions and 170 deletions

View file

@ -164,4 +164,4 @@ jobs:
- run: npm --prefix server ci
- run: npm --prefix server run db:create
- run: npm --prefix server run db:migrate
- run: npm --prefix server run test:e2e -- --silent
- run: NODE_OPTIONS=--max_old_space_size=16096 npm --prefix server run test:e2e -- --silent --testTimeout=10000

View file

@ -1 +1 @@
2.2.1
2.2.2

3175
plugins/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -163,8 +163,8 @@ export default class MongodbService implements QueryService {
const database = sourceOptions.database;
const host = sourceOptions.host;
const port = sourceOptions.port;
const username = sourceOptions.username;
const password = sourceOptions.password;
const username = encodeURIComponent(sourceOptions.username);
const password = encodeURIComponent(sourceOptions.password);
const needsAuthentication = username !== '' && password !== '';
const uri = needsAuthentication
@ -179,7 +179,14 @@ export default class MongodbService implements QueryService {
db = client.db(database);
} else {
const connectionString = sourceOptions['connection_string'];
client = new MongoClient(connectionString, { useNewUrlParser: true, useUnifiedTopology: true });
const password = connectionString.match(/(?<=:\/\/)(.*):(.*)@/)[2];
const encodedPassword = encodeURIComponent(password);
const encodedConnectionString = connectionString.replace(password, encodedPassword);
client = new MongoClient(encodedConnectionString, { useNewUrlParser: true, useUnifiedTopology: true });
await client.connect();
db = client.db();
}

View file

@ -1 +1 @@
2.2.1
2.2.2