Skip to content

Commit 681a38f

Browse files
committed
fix postgres db url encoding
1 parent 42f191c commit 681a38f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function convertIntegrationConfigToJson(config: IntegrationConfig): string {
3535
// Format: postgresql://username:password@host:port/database
3636
const encodedUsername = encodeURIComponent(config.username);
3737
const encodedPassword = encodeURIComponent(config.password);
38-
const url = `postgresql://${encodedUsername}:${encodedPassword}@${config.host}:${config.port}/${config.database}`;
38+
const encodedDatabase = encodeURIComponent(config.database);
39+
const url = `postgresql://${encodedUsername}:${encodedPassword}@${config.host}:${config.port}/${encodedDatabase}`;
3940

4041
return JSON.stringify({
4142
url: url,

0 commit comments

Comments
 (0)